Define and run multi-container applications with Docker https://docs.docker.com/compose/
Find a file
Daniel Nephin d7a90092c2 Merge pull request #1118 from funkyfuture/issue-1082
Change port in ports-composefile to 49152
2015-03-17 21:39:34 -04:00
bin
compose Merge pull request #867 from knutwalker/feature/timeout-flag 2015-03-13 17:41:16 +00:00
contrib/completion/bash Add timeout flag to stop, restart, and up 2015-03-10 12:21:58 +01:00
docs Fix environment resolution 2015-03-13 14:22:28 +00:00
script Merge pull request #1005 from aanand/docker-in-docker 2015-03-17 15:13:59 +00:00
tests Change port in ports-composefile to 49152 2015-03-17 00:21:29 +01:00
.dockerignore
.gitignore
CHANGES.md
CONTRIBUTING.md Run tests using Docker-in-Docker so we can test multiple versions 2015-03-09 17:53:54 +00:00
Dockerfile Kick everything off from a single container 2015-03-09 17:53:54 +00:00
LICENSE
MAINTAINERS
MANIFEST.in
README.md Remove wercker status from readme 2015-03-13 19:36:54 +00:00
requirements-dev.txt
requirements.txt Remove restriction for requests version, update docker-py requirement 2015-03-13 14:39:11 +02:00
ROADMAP.md
setup.py Remove restriction for requests version, update docker-py requirement 2015-03-13 14:39:11 +02:00
SWARM.md
tox.ini
wercker.yml

Docker Compose

(Previously known as Fig)

Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.

Compose is great for development environments, staging servers, and CI. We don't recommend that you use it in production yet.

Using Compose is basically a three-step process.

First, you define your app's environment with a Dockerfile so it can be reproduced anywhere:

FROM python:2.7
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code
CMD python app.py

Next, you define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment:

web:
  build: .
  links:
   - db
  ports:
   - "8000:8000"
db:
  image: postgres

Lastly, run docker-compose up and Compose will start and run your entire app.

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

  • Full documentation is available on Docker's website.
  • Hop into #docker-compose on Freenode if you have any questions.