Skip to content

fix: Note about restart: always in docker in docker-compose.yaml #1

@creaturenex

Description

@creaturenex

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions