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.
docker compose up --buildconfigured by · docker compose up --build is a Docker Compose command that rebuilds service images before creating and starting the services.
Docker Composepart of · Docker Compose is a tool for defining and running applications composed of multiple containers through declarative configuration.
container imageproduces · A container image is a packaged filesystem and configuration artifact from which a container can be created and run.
containerproduces · A software container is an isolated execution environment that packages an application and its dependencies while sharing the host operating system kernel.
docker compose downcontrasts with · docker compose down is a Docker Compose command that stops and removes service containers and networks, optionally removing managed volumes.
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.