compose README

The project's README from github.com/docker/compose. As one markdown file: README.md.

Table of Contents

Docker Compose

GitHub release PkgGoDev Build Status Codecov OpenSSF Scorecard Docker Compose

Docker Compose is a tool for running multi-container applications on Docker defined using the Compose file format. A Compose file is used to define how one or more containers that make up your application are configured. Once you have a Compose file, you can create and start your application with a single command: docker compose up.

Note: About Docker Swarm Docker Swarm used to rely on the legacy compose file format but did not adopt the compose specification so is missing some of the recent enhancements in the compose syntax. After acquisition by Mirantis swarm isn't maintained by Docker Inc, and as such some Docker Compose features aren't accessible to swarm users.

Where to get Docker Compose

Windows and macOS

Docker Compose is included in Docker Desktop for Windows and macOS.

Linux

You can download Docker Compose binaries from the release page on this repository.

Rename the relevant binary for your OS to docker-compose and copy it to $HOME/.docker/cli-plugins

Or copy it into one of these folders to install it system-wide:

(might require making the downloaded file executable with chmod +x)

Quick Start

Using Docker Compose is a three-step process:

  1. Define your app's environment with a Dockerfile so it can be reproduced anywhere.
  2. Define the services that make up your app in compose.yaml so they can be run together in an isolated environment.
  3. Lastly, run docker compose up and Compose will start and run your entire app.

A Compose file looks like this:

services:
  web:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - .:/code
  redis:
    image: redis

Contributing

Want to help develop Docker Compose? Check out our contributing documentation.

If you find an issue, please report it on the issue tracker.

Legacy

The Python version of Compose is available under the v1 branch.

compose (docker/compose)

infrastructure
Searching Database…

38.4K ·GitHub
What is this?Docker Compose is a tool for defining and running multi-container Docker applications, configured through a single Compose file (compose.yaml).
Is this a standalone tool or part of Docker?It is a CLI plugin for Docker, invoked as 'docker compose', and ships bundled inside Docker Desktop on Windows and macOS.
How do I get Docker Compose running?On Windows and macOS it comes bundled with Docker Desktop. On Linux, download the binary from the releases page, rename it to docker-compose, and place it in a cli-plugins folder like $HOME/.docker/cli-plugins or /usr/local/lib/docker/cli-plugins.
Do I need anything besides Docker itself?You need the Docker engine installed, since Compose is a plugin that works on top of it; on Linux you may need to chmod the binary executable manually.
Does Docker Swarm get the same features?No — Docker Swarm still relies on the legacy compose file format and isn't maintained with the newer compose spec enhancements, so some recent Compose features aren't accessible to Swarm users.
Which platforms does it run on?Windows and macOS via Docker Desktop, and Linux via a standalone binary installed as a CLI plugin.
What does the basic workflow look like?You define a Dockerfile for your app's environment, describe services in compose.yaml, then run docker compose up to start the whole stack.
Is there an older Python-based version?Yes, the original Python implementation (Compose v1) is still available under the v1 branch, but this repo's Go version is the current one.
How is this different from plain docker run?Instead of manually starting and linking containers one by one, you declare all services, networks, and volumes in a single YAML file and bring them up together with one command.
What are similar projects?k9s, kompose, rook, dokku, minikube, kops, ctop, tilt
Creator
docker
Size
29.3 MB
Stars
38.4K
Age
12y
Commits · 90 Days