Starting Docker containers after a host restart

I’ve recently started learning Docker, and how to run Docker on a Raspberry PI 3. I soon realized that whenever the host shuts down, or restarts the Docker containers will not restart automatically. I know you can set the container to auto start but if you are a Noob like me, you can use the following to get the containers back up and running.

docker ps -a

The command docker ps -a will list all the containers event the once that are not running.

Next we will start the container using the command docker container start {containerid} in my example it will be docker container start 311528034aaa

You will see when running the command again the container will be in a up status

I’ve really love working with docker, it’s a great platform and the future.