Releases: docker/compose
1.3.0 RC1
This is a release candidate for version 1.3.0 of Docker Compose. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.0rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or pip install -U docker-compose==1.3.0rc1
if you prefer Pip.
Now, two important notes:
- This release contains breaking changes, and you will need to either remove or migrate your existing containers before running your app - see the upgrading section of the install docs for details.
- Compose now requires Docker 1.6.0 or later.
We've done a lot of work in this release to remove hacks and make Compose more stable:
- Compose now uses Docker labels, rather than container names, to keep track of containers. This is both cleaner and more performant.
- Compose no longer uses "intermediate containers" when recreating containers for a service. This makes
docker-compose up
less complex and more resilient to failure.
There are some new features:
-
docker-compose up
has an experimental new behaviour: it will only recreate containers for services whose configuration has changed indocker-compose.yml
. This will eventually become the default, but for now you can take it for a spin:$ docker-compose up --x-smart-recreate
-
When invoked in a subdirectory of a project,
docker-compose
will now climb up through parent directories until it finds adocker-compose.yml
.
Several new configuration keys have been added to docker-compose.yml
:
dockerfile
, likedocker build --file
, lets you specify an alternate Dockerfile to use withbuild
.labels
, likedocker run --labels
, lets you add custom metadata to containers.extra_hosts
, likedocker run --add-host
, lets you add entries to a container's/etc/hosts
file.pid: host
, likedocker run --pid=host
, lets you reuse the same PID namespace as the host machine.cpuset
, likedocker run --cpuset-cpus
, lets you specify which CPUs to allow execution in.read_only
, likedocker run --read-only
, lets you mount a container's filesystem as read-only.security_opt
, likedocker run --security-opt
, lets you specify security options.log_driver
, likedocker run --log-driver
, lets you specify a log driver.
Many bugs have been fixed, including the following:
- The output of
docker-compose run
was sometimes truncated, especially when running under Jenkins. - A service's volumes would sometimes not update after volume configuration was changed in
docker-compose.yml
. - Authenticating against third-party registries would sometimes fail.
docker-compose run --rm
would fail to remove the container if the service had arestart
policy in place.
Thanks @ahromis, @albers, @aleksandr-vin, @antoineco, @ccverak, @chernjie, @dnephin, @josephpage, @KyleJamesWalker, @lsowen, @mchasal, @sdake, @sherter, @stephenlawrence, @turtlemonvh, @vdemeester, @xuxinkun and @zwily!
1.2.0
To install Compose 1.2.0, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install command completion for the bash shell.
Here's what's new:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Directories passed to
build
, filenames passed toenv_file
and volume host paths passed tovolumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-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. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @thaJeztah and @vmalloc!
1.2.0 RC4
This is a release candidate for Compose 1.2.0. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.2.0rc4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install command completion for the bash shell.
On top of the changes listed below for RC1-RC3, the following bugs have been fixed:
- Environment variables and the user's home directory (~) were not expanding properly in
volumes
host paths.
Here are the changes for RC3:
- When copying a service's configuration with
extends
,image
andbuild
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 withimage
defined is extended andbuild
is added, theimage
entry will be removed. - When copying a service's configuration with
extends
, if both services defined a multi-value option such asports
ordns
, 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 thatdocker-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.
Here are the changes for RC2:
- A bug has been fixed where containers were being created with blank entries for "Dns" and "DnsSearch", causing DNS lookups from within a container to fail.
Here are the changes for RC1:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Filenames in
env_file
and volume host paths involumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-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. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.- Problems with authentication when using images from third-party registries have been fixed.
docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @moysesb, @thaJeztah and @vmalloc!
1.2.0 RC3
This is a release candidate for Compose 1.2.0. To try it out, run the following commands:
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
Optionally, you can also install command completion for the bash shell.
On top of the changes listed below for RC1 and RC2, the following bugs have been fixed:
- When copying a service's configuration with
extends
,image
andbuild
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 withimage
defined is extended andbuild
is added, theimage
entry will be removed. - When copying a service's configuration with
extends
, if both services defined a multi-value option such asports
ordns
, 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 thatdocker-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.
Here are the changes for RC2:
- A bug has been fixed where containers were being created with blank entries for "Dns" and "DnsSearch", causing DNS lookups from within a container to fail.
Here are the changes for RC1:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Filenames in
env_file
and volume host paths involumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-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. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.- Problems with authentication when using images from third-party registries have been fixed.
docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @moysesb, @thaJeztah and @vmalloc!
1.2.0 RC2
This is a release candidate for Compose 1.2.0. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.2.0rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install command completion for the bash shell.
- On top of the changes listed below for RC1, a bug has been fixed where containers were being created with blank entries for "Dns" and "DnsSearch", causing DNS lookups from within a container to fail.
Here are the changes for RC1:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Filenames in
env_file
and volume host paths involumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-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. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.- Problems with authentication when using images from third-party registries have been fixed.
docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @thaJeztah and @vmalloc!
1.2.0 RC1
This is a release candidate for Compose 1.2.0. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.2.0rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install command completion for the bash shell.
Here's what's new:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Filenames in
env_file
and volume host paths involumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-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. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.- Problems with authentication when using images from third-party registries have been fixed.
docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @thaJeztah and @vmalloc!
1.1.0
Fig has been renamed to Docker Compose, or just Compose for short. This has several implications for you:
- The command you type is now
docker-compose
, notfig
. - You should rename your
fig.yml
todocker-compose.yml
. - If you’re installing via PyPi, the package is now
docker-compose
, so install it withpip install docker-compose
.
To install Compose, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Besides that, there’s a lot of new stuff in this release:
docker-compose run
now has a--service-ports
flag for exposing ports on the given service. This is useful for e.g. running your webapp with an interactive debugger.- You can now link to containers outside your app with the
external_links
option in docker-compose.yml. - You can now prevent
docker-compose up
from automatically building images with the--no-build
option. This will make fewer API calls and run faster. - If you don’t specify a tag when using the
image
key, Compose will default to thelatest
tag, rather than pulling all tags. docker-compose kill
now supports the-s
flag, allowing you to specify the exact signal you want to send to a service’s containers.- docker-compose.yml now has an
env_file
key, analogous todocker run --env-file
, letting you specify multiple environment variables in a separate file. This is great if you have a lot of them, or if you want to keep sensitive information out of version control. - docker-compose.yml now supports the
dns_search
,cap_add
,cap_drop
,cpu_shares
andrestart
options, analogous todocker run
’s--dns-search
,--cap-add
,--cap-drop
,--cpu-shares
and--restart
options. - Compose now ships with Bash tab completion - see the installation and usage docs at https://github.com/docker/compose/blob/1.1.0/docs/completion.md
- We’ve made a few small changes to ensure that Compose will work with Swarm, Docker’s new clustering tool (https://github.com/docker/swarm). Eventually you'll be able to point Compose at a Swarm cluster instead of a standalone Docker host and it’ll run your containers on the cluster with no extra work from you. As Swarm is still developing, integration is rough and lots of Compose features don't work yet. Check the integration doc to see how it's progressing.
- A number of bugs have been fixed - see the milestone for details: https://github.com/docker/compose/issues?q=milestone%3A1.1.0+
Thanks @dnephin, @squebe, @jbalonso, @raulcd, @benlangfeld, @albers, @ggtools, @bersace, @dtenenba, @petercv, @drewkett, @TFenby, @paulRbr, @Aigeruth and @salehe!
1.1.0-rc2
Fig has been renamed to Docker Compose, or just Compose for short. This has several implications for you:
- The command you type is now
docker-compose
, notfig
. - You should rename your fig.yml to docker-compose.yml.
- The PyPi package is now
docker-compose
.
This is a release candidate for Docker Compose 1.1.0. To try it out, install via curl:
curl -L https://github.com/docker/fig/releases/download/1.1.0-rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose; chmod +x /usr/local/bin/docker-compose
(If you install via PyPi, use pip install docker-compose==1.1.0-rc2
.)
On top of the changelog for 1.1.0-rc1 (see below), the following bugs have been fixed:
- When an environment variables file specified with
env_file
doesn't exist, Compose was showing a stack trace instead of a helpful error. - Configuration files using the old name (
fig.yml
) were not being read unless explicitly specified withdocker-compose -f
. Compose now reads them and prints a deprecation warning. - Bash tab completion now reads
fig.yml
if it's present.
Here's the changelog for 1.1.0-rc1:
- We’ve made a few small changes to ensure that Compose will work with Swarm, Docker’s new clustering tool (https://github.com/docker/swarm). Eventually you'll be able to point Compose at a Swarm cluster instead of a standalone Docker host and it’ll run your containers on the cluster with no extra work from you. As Swarm is still developing, integration is rough and lots of Compose features don't work yet.
docker-compose run
now has a--service-ports
flag for exposing ports on the given service. This is useful for e.g. running your webapp with an interactive debugger.- You can now link to containers outside your app with the
external_links
option in docker-compose.yml. - You can now prevent
docker-compose up
from automatically building images with the--no-build
option. This will make fewer API calls and run faster. - If you don’t specify a tag when using the
image
key, Compose will default to thelatest
tag, rather than pulling all tags. docker-compose kill
now supports the-s
flag, allowing you to specify the exact signal you want to send to a service’s containers.- docker-compose.yml now has an
env_file
key, analogous todocker run --env-file
, letting you specify multiple environment variables in a separate file. This is great if you have a lot of them, or if you want to keep sensitive information out of version control. - docker-compose.yml now supports the
dns_search
,cap_add
,cap_drop
andrestart
options, analogous todocker run
’s--dns-search
,--cap-add
,--cap-drop
and--restart
options. - Compose now ships with Bash tab completion - see the installation and usage docs at https://github.com/docker/fig/blob/1.1.0-rc1/docs/completion.md
- A number of bugs have been fixed - see the milestone for details: https://github.com/docker/fig/issues?q=milestone%3A1.1.0+
1.1.0-rc1
Fig has been renamed to Docker Compose, or just Compose for short. This has several implications for you:
- The command you type is now
docker-compose
, notfig
. - You should rename your fig.yml to docker-compose.yml.
- The PyPi package is now
docker-compose
.
This is a release candidate for Docker Compose 1.1.0. To try it out, install via curl:
curl -L https://github.com/docker/fig/releases/download/1.1.0-rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose; chmod +x /usr/local/bin/docker-compose
(If you install via PyPi, use pip install docker-compose==1.1.0-rc1
.)
Besides the rename, there’s a lot of new stuff:
- We’ve made a few small changes to ensure that Compose will work with Swarm, Docker’s new clustering tool (https://github.com/docker/swarm). Eventually you'll be able to point Compose at a Swarm cluster instead of a standalone Docker host and it’ll run your containers on the cluster with no extra work from you. As Swarm is still developing, integration is rough and lots of Compose features don't work yet.
docker-compose run
now has a--service-ports
flag for exposing ports on the given service. This is useful for e.g. running your webapp with an interactive debugger.- You can now link to containers outside your app with the
external_links
option in docker-compose.yml. - You can now prevent
docker-compose up
from automatically building images with the--no-build
option. This will make fewer API calls and run faster. - If you don’t specify a tag when using the
image
key, Compose will default to thelatest
tag, rather than pulling all tags. docker-compose kill
now supports the-s
flag, allowing you to specify the exact signal you want to send to a service’s containers.- docker-compose.yml now has an
env_file
key, analogous todocker run --env-file
, letting you specify multiple environment variables in a separate file. This is great if you have a lot of them, or if you want to keep sensitive information out of version control. - docker-compose.yml now supports the
dns_search
,cap_add
,cap_drop
andrestart
options, analogous todocker run
’s--dns-search
,--cap-add
,--cap-drop
and--restart
options. - A number of bugs have been fixed - see the milestone for details: https://github.com/docker/fig/issues?q=milestone%3A1.1.0+
1.0.1
Install/upgrade instructions here.
- Added an
--allow-insecure-ssl
option to allowfig up
,fig run
andfig pull
to pull from insecure registries. - Fixed
fig run
not showing output in Jenkins. - Fixed a bug where Fig couldn't build Dockerfiles with ADD statements pointing at URLs.