LinuxCommandLibrary

docker-compose-up

start compose services

TLDR

Start services

$ docker compose up
copy
Start in detached mode
$ docker compose up -d
copy
Build images before starting
$ docker compose up --build
copy
Start specific services
$ docker compose up [service1] [service2]
copy
Force recreate containers
$ docker compose up --force-recreate
copy
Scale a service
$ docker compose up --scale [service]=[3]
copy
Remove orphans
$ docker compose up --remove-orphans
copy

SYNOPSIS

docker compose up [options] [service...]

DESCRIPTION

docker compose up builds, creates, starts, and attaches to containers for services defined in docker-compose.yml. Creates networks and volumes as needed.

PARAMETERS

-d, --detach

Run in background.
--build
Build images before starting.
--force-recreate
Recreate containers even if unchanged.
--no-deps
Don't start linked services.
--scale service=num
Scale service to num instances.
--remove-orphans
Remove containers not defined in Compose file.
--wait
Wait for services to be healthy.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard