-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Issue
The container always restarts in the background consuming resources after the laptop turns back on. The docker-compose.yaml file currently has the policy
restart: always
Description
My current OS is elementaryOS ubuntu based distro. When looking at the docker documentation, I believe it is working as intended in that the container restart when docker daemon starts, on my system the docker daemon starts when the laptop starts.
This command will restart your containers when built with docker-compose, which great for development or deployed app, but for your local machine might create containers that run in the background when the pc starts.
The confusion occurred because I was gracefully killing the container with CTRL+C or docker kill CONTAINER_ID
I believe the correct way to stop and tear down the container is with docker compose down
Potential Fix
Add a note in the README.md to actually stop the container is to use docker compose down, or if you want to persist data via volumes.