docker after compose code example
Example 1: docker compose down
# Stop services only
docker-compose stop
# Stop and remove containers, networks..
docker-compose down -f <file>
# Down and remove volumes
docker-compose down --volumes
# Down and remove images
docker-compose down --rmi <all|local>
Example 2: docker compose
version: '2.0'
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- .:/code
- logvolume01:/var/log
links:
- redis
redis:
image: redis
volumes:
logvolume01: {}