liveBook · Manning

Docker compose up

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

docker compose up is a Docker Compose command that creates and starts the services defined by an application configuration.

docker compose up creates and starts the services defined in a Docker Compose file, turning the application configuration into running containers. Run it from the directory containing the Compose file. Add --build when image changes must include updated application code. section 4.3.3

Use the command variants according to the application lifecycle:

  • docker compose up starts containers from previously built images; the first invocation builds images automatically. section 4.3.3
  • docker compose up --build rebuilds images before instantiating containers, ensuring code changes reach the running application. section 4.3.3
  • After stopping with Ctrl-C, use docker compose down to stop and destroy the application; add --volumes for a clean restart without persisted service volumes. section 4.3.5

Boot a microservice application

From the directory containing the Compose file, run docker compose up --build. Docker Compose builds the image, starts the container, and can display output such as “Microservice online” from the video-streaming service. section 4.3.3

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Explains startup, image rebuilding, output validation, and shutdown consequences without descending into container internals.
Examples
Uses a video-streaming microservice, a Compose file, terminal commands, and “Microservice online” startup output.
What it assumes
Assumes a Docker Compose file and service Dockerfile, while demonstrating the required commands from a working application.
What you can do after
Operate/configure a Compose application, rebuild changed images, validate startup output, and return the environment to a clean state.
How it connects
Connects Docker Compose with containers, images, volumes, microservices, and the down command.

Also explained in

Compare how 2 books explain docker compose up →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.