What is a difference between docker compose stop and docker compose down?
Experience Level: Junior
Tags: Docker Compose
Answer
- When you execute docker compose stop, the running containers are stopped and they are not removed.
- When you execute docker compose down, the running containers are stopped and also removed. Also the networks, volumes and images created by docker compose up are removed.
Related Docker Compose job interview questions
What format does Docker Compose file support?
Docker Compose JuniorHow can you run multiple copies of Docker Compose file on the same host side by side?
Docker Compose JuniorHow do you display running processes of services that run as part of Docker Compose?
Docker Compose JuniorHow do you restart a service my-service that is either stopped or runs as part of Docker Compose?
Docker Compose JuniorHow do you restart all stopped and running Docker Compose services?
Docker Compose Junior