How can u restart the containers present in docker after a power outage.
After the power outage the containers are not running. When i check docker with:
pi@BrewPi-server:~ $ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2d2d8251e5e9 brewpi/brewpi-raspbian “/entrypoint.sh /wat…” 4 days ago Exited (255) 24 hours ago 0.0.0.0:80-81->80-81/tcp brewpi
a6f19a40f20b portainer/portainer “/portainer -H unix:…” 5 days ago Exited (255) 24 hours ago 0.0.0.0:9000->9000/tcp portainer
I can see they have the status Exited. When I try to start these containers i get the response:
pi@BrewPi-server:~ $ docker start portainer
Error response from daemon: container “a6f19a40f20b6ef7faeb6291f4b9524bba4e5c3f216bda30e48e74b40379d6b6”: already exists
Error: failed to start containers: portainer
What can I do to start these containers. And what to do to restart them automatically after a power outage.