Define and run multi-container applications with Docker
Python Shell PowerShell
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci Check volume config against remote and error out if diverged Mar 13, 2018
bin Use newer versions of pre-commit hooks Aug 21, 2017
compose Bump 1.22.0 dev Apr 12, 2018
contrib Merge pull request #5868 from albers/completion-for-1.21.0 Apr 12, 2018
docs missing "is" Mar 23, 2018
experimental Remove doc on experimental networking support Jul 25, 2016
project Better installation instruction in release notes Dec 7, 2017
script Fix appveyor build Apr 20, 2018
tests Make sure error messages are unicode strings before combining Apr 9, 2018
.dockerignore Some more test adjustments for Swarm support Jul 26, 2017
.gitignore Update .gitignore Apr 17, 2018
.pre-commit-config.yaml Use newer versions of pre-commit hooks Aug 21, 2017
CHANGELOG.md Bump 1.21.0 Apr 9, 2018
CHANGES.md Rename CHANGES.md to CHANGELOG.md Aug 14, 2015
CONTRIBUTING.md Keep CONTRIBUTING.md information up to date Feb 12, 2018
Dockerfile Remove obsolete code that slows down test execution Feb 2, 2018
Dockerfile.armhf Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018
Dockerfile.run Add libgcc dependency for Compose in a container Mar 23, 2018
Dockerfile.s390x Use slim alpine instead of bulky debian Oct 18, 2017
Jenkinsfile Parallelize Docker versions Feb 3, 2018
LICENSE Docker, Inc. Jul 24, 2014
MAINTAINERS Fix indentation + HOF comment Mar 15, 2018
MANIFEST.in Add the git sha to version output Dec 3, 2015
README.md Improve spelling in the README.md Feb 7, 2018
SWARM.md Update Swarm integration guide and make it an official part of the docs Feb 23, 2016
appveyor.yml Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018
docker-compose.spec Add 2.4 file format with platform support. Also reads DOCKER_DEFAULT_… Mar 30, 2018
logo.png include logo in README Sep 15, 2015
requirements-build.txt Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018
requirements-dev.txt Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018
requirements.txt Bump SDK -> 3.2.1 Mar 30, 2018
setup.cfg enable universal wheels Jan 10, 2017
setup.py Bump SDK -> 3.2.1 Mar 30, 2018
tox.ini Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018

README.md

Docker Compose

Docker Compose

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration. To learn more about all the features of Compose see the list of features.

Compose is great for development, testing, and staging environments, as well as CI workflows. You can learn more about each case in Common Use Cases.

Using Compose is basically 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 docker-compose.yml 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 docker-compose.yml looks like this:

version: '2'

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

For more information about the Compose file, see the Compose file reference

Compose has commands for managing the whole lifecycle of your application:

  • Start, stop and rebuild services
  • View the status of running services
  • Stream the log output of running services
  • Run a one-off command on a service

Installation and documentation

Contributing

Build Status

Want to help build Compose? Check out our contributing documentation.

Releasing

Releases are built by maintainers, following an outline of the release process.