# Docker Compose 1.2.0 RC3 发布

2015-04-02

Docker Compose 1.2.0 RC3 发布，测试此版本请使用：

curl -L https://github.com/docker/compose/releases/download/1.2.0rc3/docker-compose-uname -s-uname -m > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

• When copying a service's configuration with extends, image and build could come into conflict, resulting in an error, as it makes no sense to have both defined. Each now overwrites the other: if a service with image defined is extended and build is added, the image entry will be removed.

• When copying a service's configuration with extends, if both services defined a multi-value option such as ports or dns, the original value would be completely discarded. They are now concatenated instead.

• When a relative path is supplied to build, it is treated as relative to the directory of the configuration file, not the directory that docker-compose is being run in. In the majority of cases, those are the same, but if you use the -f|--file argument to specify a configuration file in another directory, this is a breaking change.

Docker Compose 是 Docker 编排服务的一部分，Machine 可以让用户在其它平台快速安装Docker，Swarm 可以让 Docker 容器在集群中高效运转，而 Compose 可以让用户在集群中部署分布式应用。简单的说，Docker Compose 属于一个“应用层”的服务，用户可以定义哪个容器组运行哪个应用，它支持动态改变应用，并在需要时扩展。

containers:

web:

build: .

command: python app.py

ports:

- "5000:5000"

volumes:

- .:/code

- redis

environment:

- PYTHONUNBUFFERED=1

redis:

image: redis:latest

command: redis-server --appendonly yes

% docker up

7 收藏

2 评论
7 收藏