Skip to content

Docker compose commands

a-a-hofmann edited this page Sep 13, 2019 · 1 revision

Start containers in background

docker-compose up -d

See running containers

docker-compose ps

or

docker ps

See running containers

docker-compose ps

or

docker ps

See logs

docker-compose logs

or (-f follows logs, works like tail -f)

docker-compose logs -f <container-name-as-in-docker-compose-file>

Restart a container without removing it

docker-compose restart <container-name-as-in-docker-compose-file>

Stop/start a container without removing it

docker-compose {stop|start} <container-name-as-in-docker-compose-file>