✦ For everyone, free.

Practical knowledge for real and everyday life

Home

9.4.1 Compose Up

A focused guide to Compose Up, connecting core concepts with practical Docker and container operations.

docker compose up is the primary command for starting a Compose application, creating and starting every necessary network, volume, and service container according to the Compose file's configuration, in the correct order reflecting any declared dependencies.

The Basic Invocation

Running up without additional flags starts the application in the foreground, with logs from every service streamed directly to the terminal.

docker compose up
Running in Detached Mode

The -d flag starts the application in the background, returning control of the terminal immediately rather than streaming logs.

docker compose up -d

This is the more common form for everyday use, since it doesn't tie up the terminal session for as long as the application continues running.

Rebuilding Images as Part of Starting

Combining up with --build ensures any services with a build configuration are rebuilt before starting, useful during active development when source code has changed.

docker compose up -d --build
Starting Only Specific Services

A specific service (and its declared dependencies) can be started without bringing up the entire application.

docker compose up -d db

This starts only db (and anything db itself depends on), leaving other services untouched.

Why Up Is the Command Most Commonly Used With Compose

As the command that actually brings an application's defined services to life — creating supporting infrastructure and starting containers in a dependency-respecting order — up is the most frequently used Compose command, serving as the practical entry point into using a Compose-defined application at all.

Content in this section