docker-compose
Run and manage multi container Docker applications. tldr-pages
On several platforms
Several platforms
Run and manage multi container Docker applications. Some subcommands such as up, down, logs, stop, etc. have their own usage documentation.
List all running containers
docker compose psIdentifyCreate and start all containers in the background using a docker-compose.yml file from the current directory
docker compose up --detachIdentify--detachDetached mode: Run containers in the background Docker Compose referenceStart all containers, rebuild if necessary
docker compose up --buildIdentify--buildBuild images before starting containers Docker Compose referenceStart all containers by specifying a project name and using an alternate compose file
docker compose --project-name project_name --file path/to/file upIdentify--project-nameProject name Docker Compose reference--fileCompose configuration files Docker Compose referenceStop all running containers
docker compose stopIdentifyStop and remove all containers, networks, images, and volumes
docker compose down --rmi all --volumesIdentify--rmiRemove images used by services. Docker Compose reference--volumesRemove named volumes declared in the "volumes" section of the Compose file and anonymous volumes attached to containers Docker Compose referenceFollow logs for all containers
docker compose logs --followIdentify--followFollow log output Docker Compose referenceFollow logs for a specific container
docker compose logs --follow container_nameIdentify--followFollow log output Docker Compose reference