How do you stop Docker Compose services that were previously executed in a detached mode and also delete all their containers?
Experience Level: Junior
Tags: Docker Compose
Answer
Run the following command:
docker-compose down
Note that this command will remove the service containers.
Related Docker Compose job interview questions
How do you display images of all running containers that were created based on running Docker Compose?
Docker Compose JuniorHow do you list all running containers that were created based on running Docker Compose?
Docker Compose JuniorHow do you stop Docker Compose services that were previously executed in a detached mode?
Docker Compose JuniorHow do you run services from a Docker Compose file in a detached mode?
Docker Compose JuniorHow do you re-build a service my-service that is defined in a Docker Compose file without running the service?
Docker Compose Junior