Docker Compose cheat sheet
Basic config example
# docker-compose.yml
version: '3'
services:
web:
build: .
# build from Dockerfile
context: ./Path
dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
- .:/code
redis:
image: redisCommon commands
Config file reference
Building
Ports
Commands
Environment variables
Dependencies
Other options
Advanced features
Labels
DNS servers
Devices
External links
Hosts
Network
External network
Last updated