Is the docker container supposed to stop running on its own? #21
-
Started up container in Portainer Stack using the docker-compose example. Only change was to add a container name and additional volumes that it should have access to. No errors during initial creation. After a few days, it will show State as "exited - code 0". The logs for the container:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
No it should not. According to the provided log, the container has been requested to shutdown:
|
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
Thanks for the assist. Got the bottom of it. Didn't have a restart policy applied so container was not being restarted on reboots. Since I don't use it daily I didn't notice it right away so it seemed like it was a random stop. Fix: added "restart: always" to docker-compose file, aka Stack in Portainer. |
Beta Was this translation helpful? Give feedback.
Thanks for the assist. Got the bottom of it. Didn't have a restart policy applied so container was not being restarted on reboots. Since I don't use it daily I didn't notice it right away so it seemed like it was a random stop.
Fix: added "restart: always" to docker-compose file, aka Stack in Portainer.