mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-21 01:02:08 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/docker-compose-up
Normal file
41
tldr/docker-compose-up
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# docker compose up
|
||||
|
||||
> Start and run Docker services defined in a Compose file.
|
||||
> More information: <https://docs.docker.com/compose/reference/up/>.
|
||||
|
||||
- Start all services defined in the docker-compose file:
|
||||
|
||||
`docker compose up`
|
||||
|
||||
- Start services in the background (detached mode):
|
||||
|
||||
`docker compose up {{[-d|--detach]}}`
|
||||
|
||||
- Start services and rebuild images before starting:
|
||||
|
||||
`docker compose up --build`
|
||||
|
||||
- Start specific services only:
|
||||
|
||||
`docker compose up {{service1 service2 ...}}`
|
||||
|
||||
- Start services with custom compose file:
|
||||
|
||||
`docker compose {{[-f|--file]}} {{path/to/config}} up`
|
||||
|
||||
- Start services and remove orphaned containers:
|
||||
|
||||
`docker compose up --remove-orphans`
|
||||
|
||||
- Start services with scaled instances:
|
||||
|
||||
`docker compose up --scale {{service}}={{count}}`
|
||||
|
||||
- Start services and show logs with timestamps:
|
||||
|
||||
`docker compose up --timestamps`
|
||||
Reference in New Issue
Block a user