mirror of https://github.com/docker/docs.git
Docs for Compose 1.19.0 release (#5826)
* Docs for Compose 1.19.0 release Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
074268b8ca
commit
c399e1e479
|
@ -22,7 +22,7 @@ docker_ce_stable_version: "17.12"
|
|||
latest_stable_docker_engine_api_version: "1.35"
|
||||
docker_ce_edge_version: "18.01"
|
||||
docker_ee_version: "17.06"
|
||||
compose_version: "1.18.0"
|
||||
compose_version: "1.19.0"
|
||||
machine_version: "0.13.0"
|
||||
distribution_version: "2.6"
|
||||
dtr_version: "2.4"
|
||||
|
|
|
@ -32,6 +32,13 @@ provide inline default values using typical shell syntax:
|
|||
- `${VARIABLE-default}` evaluates to `default` only if `VARIABLE` is unset
|
||||
in the environment.
|
||||
|
||||
Similarly, the following syntax will allow you to specify mandatory variables:
|
||||
|
||||
- `${VARIABLE:?err}` exits with an error message containing `err` if
|
||||
`VARIABLE` is unset or empty in the environment.
|
||||
- `${VARIABLE?err}` exits with an error message containing `err` if
|
||||
`VARIABLE` is unset in the environment.
|
||||
|
||||
Other extended shell-style features, such as `${VARIABLE/foo/bar}`, are not
|
||||
supported.
|
||||
|
||||
|
|
|
@ -916,6 +916,35 @@ Example usage:
|
|||
app_net:
|
||||
driver: bridge
|
||||
|
||||
#### priority
|
||||
|
||||
Specify a priority to indicate in which order Compose should connect the
|
||||
service's containers to its networks. If unspecified, the default value is `0`.
|
||||
|
||||
In the following example, the `app` service connects to `app_net_1` first
|
||||
as it has the highest priority. It then connect to `app_net_3`, then
|
||||
`app_net_2`, which uses the default priority value of `0`.
|
||||
|
||||
version: '2.3'
|
||||
services:
|
||||
app:
|
||||
image: busybox
|
||||
command: top
|
||||
networks:
|
||||
app_net_1:
|
||||
priority: 1000
|
||||
app_net_2:
|
||||
|
||||
app_net_3:
|
||||
priority: 100
|
||||
networks:
|
||||
app_net_1:
|
||||
app_net_2:
|
||||
app_net_3:
|
||||
|
||||
> **Note:** If multiple networks have the same priority, the connection order
|
||||
> is undefined.
|
||||
|
||||
### pid
|
||||
|
||||
pid: "host"
|
||||
|
@ -964,6 +993,19 @@ port (an ephemeral host port is chosen).
|
|||
- "6060:6060/udp"
|
||||
- "12400-12500:1240"
|
||||
|
||||
### runtime
|
||||
|
||||
> [Added in version 2.3 file format](compose-versioning.md#version-23)
|
||||
|
||||
Specify which runtime to use for the service's containers. Default runtime
|
||||
and available runtimes are listed in the output of `docker info`.
|
||||
|
||||
web:
|
||||
image: busybox:latest
|
||||
command: true
|
||||
runtime: runc
|
||||
|
||||
|
||||
### scale
|
||||
|
||||
> [Added in version 2.2 file format](compose-versioning.md#version-22)
|
||||
|
|
|
@ -228,6 +228,7 @@ Introduces the following additional parameters:
|
|||
[`shm_size`](compose-file-v2.md#shmsize) for [build configurations](compose-file-v2.md#build)
|
||||
- `start_period` for [`healthchecks`](compose-file-v2.md#healthcheck)
|
||||
- ["Long syntax" for volumes](compose-file-v2.md#long-syntax)
|
||||
- [`runtime`](compose-file-v2.md#runtime) for service definitions
|
||||
|
||||
### Version 3
|
||||
|
||||
|
|
|
@ -91,6 +91,29 @@ Supported values: `true` or `1` to enable, `false` or `0` to disable.
|
|||
If set, the value of the `COMPOSE_FILE` environment variable is separated
|
||||
using this character as path separator.
|
||||
|
||||
## COMPOSE\_FORCE\_WINDOWS\_HOST
|
||||
|
||||
If set, volume declarations using the [short syntax](../compose-file/index.md#short-syntax-3)
|
||||
are parsed assuming the host path is a Windows path, even if Compose is
|
||||
running on a UNIX-based system.
|
||||
Supported values: `true` or `1` to enable, `false` or `0` to disable.
|
||||
|
||||
## COMPOSE\_IGNORE\_ORPHANS
|
||||
|
||||
If set, Compose doesn't try to detect orphaned containers for the project.
|
||||
Supported values: `true` or `1` to enable, `false` or `0` to disable.
|
||||
|
||||
## COMPOSE\_PARALLEL\_LIMIT
|
||||
|
||||
Sets a limit for the number of operations Compose can execute in parallel. The
|
||||
default value is `64`, and may not be set lower than `2`.
|
||||
|
||||
## COMPOSE\_INTERACTIVE\_NO\_CLI
|
||||
|
||||
If set, Compose doesn't attempt to use the Docker CLI for interactive `run`
|
||||
and `exec` operations. This option is not available on Windows where the CLI
|
||||
is required for the aforementioned operations.
|
||||
Supported: `true` or `1` to enable, `false` or `0` to disable.
|
||||
|
||||
## Related information
|
||||
|
||||
|
|
|
@ -10,29 +10,32 @@ Usage: up [options] [--scale SERVICE=NUM...] [SERVICE...]
|
|||
|
||||
Options:
|
||||
-d Detached mode: Run containers in the background,
|
||||
print new container names.
|
||||
Incompatible with --abort-on-container-exit.
|
||||
print new container names. Incompatible with
|
||||
--abort-on-container-exit.
|
||||
--no-color Produce monochrome output.
|
||||
--no-deps Don't start linked services.
|
||||
--force-recreate Recreate containers even if their configuration
|
||||
and image haven't changed.
|
||||
--always-recreate-deps Recreate dependent containers.
|
||||
Incompatible with --no-recreate.
|
||||
--no-recreate If containers already exist, don't recreate them.
|
||||
Incompatible with --force-recreate.
|
||||
--no-recreate If containers already exist, don't recreate
|
||||
them. Incompatible with --force-recreate and -V.
|
||||
--no-build Don't build an image, even if it's missing.
|
||||
--no-start Don't start the services after creating them.
|
||||
--build Build images before starting containers.
|
||||
--abort-on-container-exit Stops all containers if any container was stopped.
|
||||
Incompatible with -d.
|
||||
-t, --timeout TIMEOUT Use this timeout in seconds for container shutdown
|
||||
when attached or when containers are already
|
||||
running. (default: 10)
|
||||
--remove-orphans Remove containers for services not
|
||||
defined in the Compose file
|
||||
--exit-code-from SERVICE Return the exit code of the selected service container.
|
||||
Implies --abort-on-container-exit.
|
||||
--scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the `scale`
|
||||
setting in the Compose file if present.
|
||||
--abort-on-container-exit Stops all containers if any container was
|
||||
stopped. Incompatible with -d.
|
||||
-t, --timeout TIMEOUT Use this timeout in seconds for container
|
||||
shutdown when attached or when containers are
|
||||
already running. (default: 10)
|
||||
-V, --renew-anon-volumes Recreate anonymous volumes instead of retrieving
|
||||
data from the previous containers.
|
||||
--remove-orphans Remove containers for services not defined
|
||||
in the Compose file.
|
||||
--exit-code-from SERVICE Return the exit code of the selected service
|
||||
container. Implies --abort-on-container-exit.
|
||||
--scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the
|
||||
`scale` setting in the Compose file if present.
|
||||
```
|
||||
|
||||
Builds, (re)creates, starts, and attaches to containers for a service.
|
||||
|
|
|
@ -5,6 +5,92 @@ keywords: release notes, compose
|
|||
toc_max: 2
|
||||
---
|
||||
|
||||
## 1.19.0 (2018-01-31)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- On UNIX platforms, interactive `run` and `exec` commands now require
|
||||
the `docker` CLI to be installed on the client by default. To revert
|
||||
to the previous behavior, users may set the `COMPOSE_INTERACTIVE_NO_CLI`
|
||||
environment variable.
|
||||
|
||||
### New features
|
||||
|
||||
#### Compose file version 3.x
|
||||
|
||||
- The output of the `config` command should now merge `deploy` options from
|
||||
several Compose files in a more accurate manner
|
||||
|
||||
#### Compose file version 2.3
|
||||
|
||||
- Added support for the `runtime` option in service definitions
|
||||
|
||||
#### Compose file version 2.1 and up
|
||||
|
||||
- Added support for the `${VAR:?err}` and `${VAR?err}` variable interpolation
|
||||
syntax to indicate mandatory variables
|
||||
|
||||
#### Compose file version 2.x
|
||||
|
||||
- Added `priority` key to service network mappings, allowing the user to
|
||||
define in which order the specified service will connect to each network
|
||||
|
||||
#### All formats
|
||||
|
||||
- Added `--renew-anon-volumes` (shorthand `-V`) to the `up` command,
|
||||
preventing Compose from recovering volume data from previous containers for
|
||||
anonymous volumes
|
||||
|
||||
- Added limit for number of simulatenous parallel operations, which should
|
||||
prevent accidental resource exhaustion of the server. Default is 64 and
|
||||
can be configured using the `COMPOSE_PARALLEL_LIMIT` environment variable
|
||||
|
||||
- Added `--always-recreate-deps` flag to the `up` command to force recreating
|
||||
dependent services along with the dependency owner
|
||||
|
||||
- Added `COMPOSE_IGNORE_ORPHANS` environment variable to forgo orphan
|
||||
container detection and suppress warnings
|
||||
|
||||
- Added `COMPOSE_FORCE_WINDOWS_HOST` environment variable to force Compose
|
||||
to parse volume definitions as if the Docker host was a Windows system,
|
||||
even if Compose itself is currently running on UNIX
|
||||
|
||||
- Bash completion should now be able to better differentiate between running,
|
||||
stopped and paused services
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- Fixed a bug that would cause the `build` command to report a connection
|
||||
error when the build context contained unreadable files or FIFO objects.
|
||||
These file types will now be handled appropriately
|
||||
|
||||
- Fixed various issues around interactive `run`/`exec` sessions.
|
||||
|
||||
- Fixed a bug where setting TLS options with environment and CLI flags
|
||||
simultaneously would result in part of the configuration being ignored
|
||||
|
||||
- Fixed a bug where the `-d` and `--timeout` flags in `up` were erroneously
|
||||
marked as incompatible
|
||||
|
||||
- Fixed a bug where the recreation of a service would break if the image
|
||||
associated with the previous container had been removed
|
||||
|
||||
- Fixed a bug where `tmpfs` volumes declared using the extended syntax in
|
||||
Compose files using version 3.2 would be erroneously created as anonymous
|
||||
volumes instead
|
||||
|
||||
- Fixed a bug where type conversion errors would print a stacktrace instead
|
||||
of exiting gracefully
|
||||
|
||||
- Fixed some errors related to unicode handling
|
||||
|
||||
- Dependent services no longer get recreated along with the dependency owner
|
||||
if their configuration hasn't changed
|
||||
|
||||
- Added better validation of `labels` fields in Compose files. Label values
|
||||
containing scalar types (number, boolean) now get automatically converted
|
||||
to strings
|
||||
|
||||
## 1.18.0 (2017-12-18)
|
||||
|
||||
### New features
|
||||
|
|
Loading…
Reference in New Issue