Search code examples
dockercoreos

How to auto restart a Docker container after a reboot in CoreOS?


Assuming the Docker daemon is restarted automatically by whatever init.d or systemd like process when the OS is restarted, what is the preferred way to restart one or more Docker containers? For example I might have a number of web servers behind a reverse proxy or a database server.


Solution

  • CoreOS uses systemd to manage long running services: