Docker Compose¶
Commands to use Docker Compose
Start services defined in docker-compose.yml
file:¶
This command builds, (re)creates, starts, and attaches to containers for a service in the background.
Stop services:¶
This command stops containers and removes containers, networks, volumes, and images created byup
.
View logs for all services:¶
This command shows the logs for all the containers, with the-f
flag used for following the log output.
Scale the number of containers for a service¶
For example, if you want to run 3 instances of theweb
service, use: