-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker compose down
does not remove all containers
#9880
Comments
Looks like this was introduced in f6e96dd, specifically the change to pkg/compose/down.go. I'm looking into why the change was made as it doesn't appear to be part of the rest of the changes in that commit or PR. |
Facing some issue while "docker-compose down" with podman where container is still up and running even if executed down command to stop the container and it errors out with the below message in journalctl logs for the container service. Any idea what the issue is? |
Ok, so it looks like compose v2 has required the At this point I'm not entirely certain what the specified behavior should be. V1 appears to remove containers without @williamjacksn can you start using --remove-orphans to achieve the behavior you want? |
It's one more thing to remember, but if this is how it is supposed to work then I guess I have to do it. If this is the desired behavior, then the documentation is misleading:
|
For now that's your workaround. I'll see if we can figure out what the intended behavior should be and either update the |
"orphans" containers is compose terminology for containers which declare a service that is not part of the current compose model, typically because user edited his compose file in the meantime. terminology is far from being perfect, but this is our legacy :) |
Facing the same issue of a container not being stopped by |
Hi @glours thanks for reaching out. Appreciate it. |
Me too. That's why adding So we need to use $ docker compose -f another-compose.yml down |
Description
Beginning with version 2.10.0,
docker compose down
does not remove containers that were created withdocker compose run
.Steps to reproduce the issue:
Describe the results you received:
In version 2.10.0 and newer,
docker compose down
does not remove containers that were created withdocker compose run
.Describe the results you expected:
In version 2.9.0,
docker compose down
will remove containers that were created withdocker compose run
.Output of
docker compose version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: