docker-compose: update command to v2 (#8481)

This commit is contained in:
Seth Falco
2022-09-12 14:55:23 +02:00
committed by GitHub
parent 408a8247cf
commit bfaefffd9c
8 changed files with 70 additions and 70 deletions

View File

@@ -1,36 +1,36 @@
# docker-compose
# docker compose
> Run and manage multi container docker applications.
> More information: <https://docs.docker.com/compose/reference/>.
- List all running containers:
`docker-compose ps`
`docker compose ps`
- Create and start all containers in the background using a `docker-compose.yml` file from the current directory:
`docker-compose up -d`
`docker compose up -d`
- Start all containers, rebuild if necessary:
`docker-compose up --build`
`docker compose up --build`
- Start all containers using an alternate compose file:
`docker-compose --file {{path/to/file}} up`
`docker compose --file {{path/to/file}} up`
- Stop all running containers:
`docker-compose stop`
`docker compose stop`
- Stop and remove all containers, networks, images, and volumes:
`docker-compose down --rmi all --volumes`
`docker compose down --rmi all --volumes`
- Follow logs for all containers:
`docker-compose logs --follow`
`docker compose logs --follow`
- Follow logs for a specific container:
`docker-compose logs --follow {{container_name}}`
`docker compose logs --follow {{container_name}}`