Make container start if docker daemon or host system is restarted First off, I am new to Docker. I was able to create a container based off an image I had previously pulled, start it, but the container is stopped if the docker daemon or the host system are restarted.

So the question is, what is the next step (after creating a container) to make it persistent so that it is started automatically when the daemon is started or restarted?

Thank you in advance.
You need to add a restart policy to your container.

example:

docker run -dit --restart=always hello-world


In this example, I am telling docker to always restart the hello-world container no matter what happens (and also run it in the background interactively). If you do a docker ps, you will see it keeps restarting. To revert this, you need to update the container restart policy like this:

docker update --restart=no &lt;CONTAINER_ID&gt;