Define and run multi-container applications with Docker
Python Shell PowerShell
Latest commit b8719c4 Jul 14, 2017 @albers albers committed with shin- Add bash completion for `pull --quiet`
Signed-off-by: Harald Albers <[email protected]>
Permalink
Failed to load latest commit information.
bin Rename binary to docker-compose and config file to docker-compose.yml Jan 20, 2015
compose Add `target` to service build configuration Jul 21, 2017
contrib Add bash completion for `pull --quiet` Jul 21, 2017
docs updated README per vnext branch plan Oct 5, 2016
experimental Remove doc on experimental networking support Jul 25, 2016
project Update release process document to account for recent changes. Oct 21, 2016
script Scripts build and push compose-tests image Jul 20, 2017
tests Add `target` to service build configuration Jul 21, 2017
.dockerignore Some more test adjustments for Swarm support Jul 20, 2017
.gitignore Handle giving help a nonexistent command Dec 3, 2016
.pre-commit-config.yaml Tests use updated get_config_paths_from_options signature Mar 24, 2016
.travis.yml Build osx binary on travis and upload to bintray. Mar 1, 2016
CHANGELOG.md Bump 1.14.0 Jun 19, 2017
CHANGES.md Rename CHANGES.md to CHANGELOG.md Aug 14, 2015
CONTRIBUTING.md Convert readthedocs links for their .org -> .io migration for hosted … Jun 8, 2016
Dockerfile check hash sums of downloaded files Jun 9, 2017
Dockerfile.armhf Add support to build docker-compose on ARM 32bit Feb 8, 2017
Dockerfile.run Improve Dockerfile.run Mar 3, 2017
Jenkinsfile Limit testing pool to Ubuntu hosts to avoid errors with dind not Nov 15, 2016
LICENSE Docker, Inc. Jul 24, 2014
MAINTAINERS Add Joffrey to maintainers May 30, 2017
MANIFEST.in Add the git sha to version output Dec 3, 2015
README.md Not colon but a dot. Apr 28, 2017
ROADMAP.md Add issue link for zero-downtime deploys May 30, 2016
SWARM.md Update Swarm integration guide and make it an official part of the docs Feb 23, 2016
appveyor.yml Move all build scripts to script/build Feb 25, 2016
docker-compose.spec Add Compose v2.3 Jul 21, 2017
logo.png include logo in README Sep 15, 2015
requirements-build.txt Use newer version of PyInstaller to fix prelinking issues Feb 3, 2017
requirements-dev.txt Use py.test as the test runner Sep 1, 2015
requirements.txt Add 'socks' extra to help with proxy environment. Jul 6, 2017
setup.cfg enable universal wheels Jan 10, 2017
setup.py Add 'socks' extra to help with proxy environment. Jul 6, 2017
tox.ini Some more test adjustments for Swarm support Jul 20, 2017

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.