Reputation: 147
Why does docker compose create containers that are only accecible from docker-compose ps and that persist after killing running container ?
Upvotes: 3
Views: 1068
Reputation: 1
docker-compose is the software wrapper around docker and there is not full support still. You can try to read a little bit about kubernets and mesos for the comparing different clusters built on top of docker or similar container systems. article on blog about swarm and compose
Upvotes: -1
Reputation: 732
It doesn't.
docker ps
only shows running containers, docker-compose ps
shows all containers related to the current compose file, running and stopped. docker-compose kill
just force stops the container and it can be restarted with docker-compose start
, it will therefore be visible when running docker-compose ps
but not docker ps
.
To list all containers with docker use docker ps -a
. To removed stopped containers related to a compose file run docker-compose rm
, if you want to stop and remove all containers, have a look at docker-compose down
.
Upvotes: 3