Should I use forever/pm2 within a (Docker) container?
问题 I am refactoring a couple of node.js services. All of them used to start with forever on virtual servers, if the process crashed they just relaunch. Now, moving to containerised and state-less application structures, I think the process should exit and the container should be restarted on a failure. Is that correct? Are there benefits or disadvantages? 回答1: My take is do not use an in-container process supervisor (forever, pm2) and instead use docker restart policy via the --restart=always