Docker / Compose

Docker / Compose: docker compose up -d — Linux

Create and start services in the background.

Availability: Tool and version dependent; install separately where required.中文

Syntax

docker compose up -d

Examples

Create and start services in the background.

docker compose up -d

Parameters, options and clauses

Option / clauseDescription
-d, --detachRun services in the background.
--buildBuild images before starting containers.
--remove-orphansRemove containers for services absent from the Compose file.
--scale <service>=<n>Set the number of containers for a service.
--waitWait for services to become running or healthy.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory