Error starting node with forever in docker container
Google Group discussion
Forever start script.js
runs in the background. To run forever
in the foreground, try forever script.js
.
This starts forever in the foreground, which is what Docker needs. Remember a container is "alive" only as long as the process defined in CMD is up and running. Since forever starts as a daemon, the command itself exits and docker will exit also.
CMD forever -c 'node --harmony' /my/path/app.js
Try using the array syntax:
CMD ["forever", "start", "-c", "node --harmony", "/my/path/app.js"]