Multi-container orchestration tool for defining and running complex Docker application stacks.
docker-compose {all-resources} {ansi} {compatibility} {dry-run} {env-file} ๐ all-resources ๐ ansi ๐ compatibility ๐ dry-run ๐ env-file docker-compose {all-resources} {ansi} {compatibility} {dry-run} {env-file} Sandbox: execFile · Timeout: 300s
container.orchestrate.compose container.orchestrate.stack container.service.manage container.network.multi container.storage.volume container.logs.tail | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
all-resources | string | No | - | Include all resources, even those not | --all-resources |
ansi | string | No | - | Control when to print ANSI control | --ansi |
compatibility | string | No | - | Run compose in backward compatibility mode | --compatibility |
dry-run | string | No | - | Execute command in dry run mode | --dry-run |
env-file | string | No | - | Specify an alternate environment file | --env-file |
file | string | No | - | Compose configuration files | -f, --file |
parallel | string | No | - | Control max parallelism, -1 for | --parallel |
profile | file | No | - | Specify a profile to enable | --profile |
progress | string | No | - | Set type of progress output (auto | --progress |
project-directory | file | No | - | Specify an alternate working directory | --project-directory |
project-name | string | No | - | Project name | -p, --project-name |
| Type | Description | MIME | Schema | Trust |
|---|---|---|---|---|
container.image.oci | Built container image | application/vnd.oci.image.manifest.v1+json | - | verified |
container.runtime.logs | Container service logs | text/plain | - | verified |
container.stack.config | Docker Compose stack configuration | application/x-yaml | - | verified |
Inputs
container.stack.composefile Docker Compose YAML file
container.image.oci Container images to use in the stack
Outputs
container.stack.running Running container stack
container.runtime.logs Aggregated service logs
network_trafficfilesystem_writeprocess_spawn Produces
container.stack.runningcontainer.runtime.logsConsumes
container.stack.composefilecontainer.image.oci| Resource | Value |
|---|---|
| CPU | medium |
| Memory | 128 MB |
| Network | medium |
| Disk I/O | medium |
Start all services in background
docker-compose up -d Build and start services
docker-compose up -d --build View running services
docker-compose ps Tail logs from all services
docker-compose logs -f Execute command in a running service
docker-compose exec web bash Stop and remove all resources
docker-compose down -v Docker Compose is a tool for defining and running multi-container Docker applications. Using a YAML file, you configure all services, networks, and volumes, then start everything with a single command.
version: "3.8"
services:
web:
build: .
ports:
- "8080:80"
depends_on:
- db
db:
image: postgres:16
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
# Start development stack
docker-compose up -d
# Rebuild specific service
docker-compose build web
# View logs during development
docker-compose logs -f web
# Run one-off commands
docker-compose exec web pytest
# Pull latest images
docker-compose pull
# Graceful restart
docker-compose restart -t 30
# Scale a service
docker-compose up -d --scale worker=3
# Stop containers
docker-compose stop
# Stop and remove everything
docker-compose down
# Remove everything including volumes
docker-compose down -v --rmi all