- Docker-compose reads configuration data from a YAML file.
- Compose is not a production grade tool but ideal for local development & test.
Setup volumes/networks & start all containers¶
Stop all containers & remove containers/volume/networks¶
List all running containers¶
View processes running inside a container¶
Show help for docker compose¶
Docker Compose Examples¶
version: '3.1' # If no version is specified then v1 is assumed. services: #same as docker run i.e. containers servicename: #A friendly name that is also a DNS name (Smiliar to --name) image: #optional if using build command: # Optional, run a command environment: # Similar to -e in docker run volumes: # Optional, same as -v in docker run servicename2: volumes: # Optional, same as docker volume create network: # Optional, same as docker network create