diff --git a/_includes/content/compose-matrix.md b/_includes/content/compose-matrix.md index 0c2df360e3..6ea701f6fe 100644 --- a/_includes/content/compose-matrix.md +++ b/_includes/content/compose-matrix.md @@ -9,6 +9,7 @@ This table shows which Compose file versions support specific Docker releases. | 3.2 | 17.04.0+ | | 3.1 | 1.13.1+ | | 3.0 | 1.13.0+ | +| 2.4 | 17.12.0+ | | 2.3 | 17.06.0+ | | 2.2 | 1.13.0+ | | 2.1 | 1.12.0+ | diff --git a/compose/compose-file/compose-file-v2.md b/compose/compose-file/compose-file-v2.md index a6a009ad16..60c574d575 100644 --- a/compose/compose-file/compose-file-v2.md +++ b/compose/compose-file/compose-file-v2.md @@ -220,6 +220,19 @@ An entry with the ip address and hostname is created in `/etc/hosts` inside cont 162.242.195.82 somehost 50.31.209.229 otherhost +#### isolation + +> [Added in version 2.1 file format](compose-versioning.md#version-21). + +Specify a build’s container isolation technology. On Linux, the only supported value +is `default`. On Windows, acceptable values are `default`, `process` and +`hyperv`. Refer to the +[Docker Engine docs](/engine/reference/commandline/run.md#specify-isolation-technology-for-container---isolation) +for details. + +If unspecified, Compose will use the `isolation` value found in the service's definition +to determine the value to use for builds. + #### labels > Added in [version 2.1](compose-versioning.md#version-21) file format @@ -329,6 +342,20 @@ Because Docker container names must be unique, you cannot scale a service beyond 1 container if you have specified a custom name. Attempting to do so results in an error. +### cpu_rt_runtime, cpu_rt_period + +> Added in [version 2.2](compose-versioning.md#version-22) file format + +Configure CPU allocation parameters using the Docker daemon realtime scheduler. + + cpu_rt_runtime: '400ms' + cpu_rt_period: '1400us' + + # Integer values will use microseconds as units + cpu_rt_runtime: 95000 + cpu_rt_period: 11000 + + ### device_cgroup_rules > [Added in version 2.3 file format](compose-versioning.md#version-23). @@ -993,6 +1020,20 @@ Tunes a container's PIDs limit. Set to `-1` for unlimited PIDs. pids_limit: 10 +### platform + +> [Added in version 2.4 file format](compose-versioning.md#version-24). + +Target platform containers for this service will run on, using the +`os[/arch[/variant]]` syntax, e.g. + + platform: osx + platform: windows/amd64 + platform: linux/arm64/v8 + +This parameter determines which version of the image will be pulled and/or +on which platform the service's build will be performed. + ### ports Expose ports. Either specify both ports (`HOST:CONTAINER`), or just the container @@ -1252,7 +1293,7 @@ then read-write is used. {: id="cpu-and-other-resources"} -### cpu_count, cpu_percent, cpu\_shares, cpu\_quota, cpus, cpuset, domainname, hostname, ipc, mac\_address, mem\_limit, memswap\_limit, mem\_swappiness, mem\_reservation, oom_kill_disable, oom_score_adj, privileged, read\_only, shm\_size, stdin\_open, tty, user, working\_dir +### cpu_count, cpu_percent, cpu\_shares, cpu\_period, cpu\_quota, cpus, cpuset, domainname, hostname, ipc, mac\_address, mem\_limit, memswap\_limit, mem\_swappiness, mem\_reservation, oom_kill_disable, oom_score_adj, privileged, read\_only, shm\_size, stdin\_open, tty, user, working\_dir Each of these is a single value, analogous to its [docker run](/engine/reference/run.md) counterpart. @@ -1260,13 +1301,14 @@ Each of these is a single value, analogous to its > **Note:** The following options were added in [version 2.2](compose-versioning.md#version-22): > `cpu_count`, `cpu_percent`, `cpus`. > The following options were added in [version 2.1](compose-versioning.md#version-21): -> `oom_kill_disable` +> `oom_kill_disable`, `cpu_period` cpu_count: 2 cpu_percent: 50 cpus: 0.5 cpu_shares: 73 cpu_quota: 50000 + cpu_period: 20ms cpuset: 0,1 user: postgresql diff --git a/compose/compose-file/compose-versioning.md b/compose/compose-file/compose-versioning.md index dd0be07305..cc5adcf877 100644 --- a/compose/compose-file/compose-versioning.md +++ b/compose/compose-file/compose-versioning.md @@ -194,7 +194,8 @@ supported by **Compose 1.9.0+**. Introduces the following additional parameters: - [`link_local_ips`](compose-file-v2.md#linklocalips) -- [`isolation`](compose-file-v2.md#isolation) +- [`isolation`](compose-file-v2.md#isolation) in build configurations and + service definitions - `labels` for [volumes](compose-file-v2.md#volume-configuration-reference) and [networks](compose-file-v2.md#network-configuration-reference) - `name` for [volumes](compose-file-v2.md#volume-configuration-reference) @@ -203,6 +204,7 @@ Introduces the following additional parameters: - [`sysctls`](compose-file-v2.md#sysctls) - [`pids_limit`](compose-file-v2.md#pidslimit) - [`oom_kill_disable`](compose-file-v2.md#oomkilldisable) +- [`cpu_period`](compose-file-v2.md) ### Version 2.2 @@ -215,6 +217,7 @@ Introduces the following additional parameters: - [`init`](compose-file-v2.md#init) - [`scale`](compose-file-v2.md#scale) +- [`cpu_rt_runtime` and `cpu_rt_period`](compose-file-v2.md#cpu_rt_runtime-cpu_rt_period) ### Version 2.3 @@ -229,7 +232,17 @@ Introduces the following additional parameters: - `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 -- [`device_cgroup_rules`](compose-file-v2.md#devicecgrouprules) +- [`device_cgroup_rules`](compose-file-v2.md#device_cgroup_rules) + +### Version 2.4 + +An upgrade of [version 2.3](#version-23) that introduces new parameters only +available with Docker Engine version **17.12.0+**. Version 2.4 files are +supported by **Compose 1.21.0+**. + +Introduces the following additional parameters: + +- [`platform`](compose-file-v2.md#platform) for service definitions ### Version 3