A service in docker-compose.yml defines a container (its image, ports, environment, etc.) that Compose runs and manages.
2 / 5
What is a Docker volume used for?
A volume stores data outside the container filesystem so it persists across container restarts and recreations.
3 / 5
What does depends_on control?
depends_on sets the start order of services. Note it waits for the container to start, not for the app inside to be ready, unless you add a healthcheck condition.
4 / 5
What do Compose networks provide?
Networks let services communicate by name on an isolated bridge; Compose creates a default network automatically.
5 / 5
Which command starts all services in detached mode?
docker-compose up -d creates and starts all defined services in the background (detached mode).