silver-mx
1/3/2019 - 11:59 PM

Docker Compose cheat sheet

Docker Compose cheat sheet

# Start containers by running docker-compose in the background
docker-compose up -d

# Show containers running as part of docker-compose
docker-compose ps

# Show processes running in each container started by docker-compose
docker-compose top

# Stop the containers without deleting the containers or stopping other resources (network and volumes for example)
docker-compose stop

# Stop the containers and remove them as well as the network (volumes stay intact)
docker-compose down

# Remove containers and network started with docker-compose (volumes and images are left intact)
docker-compose rm

# Restart containers
docker-compose restart