What is a good way to automatically start docker containers when the system boots up?
Is there a preferred way to do this on Ubuntu 14.04?
I've used supervisord
in the past to auto start web apps. But that doesn't feel like the right thing for Docker.
Best Answer
Apparently, the current method to auto-start Docker containers (from Docker 1.2) is to use restart policies. This will control how Docker should handle starting of the container upon startup and re-starting of the container when it exits. I've used the 'always' option so far, and can confirm that it makes Docker auto-start the container at system boot:
Documentation Excerpt