|
|
10 年之前 | |
|---|---|---|
| bin | 10 年之前 | |
| compose | 10 年之前 | |
| contrib | 10 年之前 | |
| docs | 10 年之前 | |
| script | 10 年之前 | |
| tests | 10 年之前 | |
| .dockerignore | 10 年之前 | |
| .gitignore | 10 年之前 | |
| CHANGES.md | 10 年之前 | |
| CONTRIBUTING.md | 10 年之前 | |
| Dockerfile | 10 年之前 | |
| LICENSE | 11 年之前 | |
| MAINTAINERS | 10 年之前 | |
| MANIFEST.in | 10 年之前 | |
| README.md | 10 年之前 | |
| ROADMAP.md | 10 年之前 | |
| SWARM.md | 10 年之前 | |
| requirements-dev.txt | 10 年之前 | |
| requirements.txt | 10 年之前 | |
| setup.py | 10 年之前 | |
| tox.ini | 10 年之前 | |
| wercker.yml | 11 年之前 |
(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:
Want to help build Compose? Check out our contributing documentation.