From b1aa298c16b9e43145b74289ab272e1b1331c645 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Fri, 23 Jun 2017 18:15:01 -0700 Subject: [PATCH] Docs for Compose 1.14 (#3697) * Specify Compose version for Compose file formats (#3297) * Specify Compose version for Compose file formats Explicitly specifying Compose versions file formats 2.1 and 2.2. * corrected typo 2.1 --> 2.2 Signed-off-by: Victoria Bialas * Document new Compose 1.14.0 features (#3695) Signed-off-by: Joffrey F * Current compose is 1.14.0 (#3690) Signed-off-by: Guillaume Rose * Fix typo --- _config.yml | 2 +- compose/compose-file/compose-file-v2.md | 33 ++++++++++++++++++- compose/compose-file/compose-versioning.md | 19 +++++++++-- compose/compose-file/index.md | 37 ++++++++++++++++++++++ 4 files changed, 86 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index e35704d19a..f209c60a44 100644 --- a/_config.yml +++ b/_config.yml @@ -12,7 +12,7 @@ safe: false lsi: false url: https://docs.docker.com keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13"] -compose_current: 1.13.0 +compose_current: 1.14.0 gems: - jekyll-redirect-from diff --git a/compose/compose-file/compose-file-v2.md b/compose/compose-file/compose-file-v2.md index c529fd3715..c393d93317 100644 --- a/compose/compose-file/compose-file-v2.md +++ b/compose/compose-file/compose-file-v2.md @@ -137,6 +137,31 @@ at build time is the value in the environment where Compose is running. > **Note**: YAML boolean values (`true`, `false`, `yes`, `no`, `on`, `off`) must > be enclosed in quotes, so that the parser interprets them as strings. +#### labels + +> Added in [version 2.1](compose-versioning.md#version-21) file format + +Add metadata to the resulting image using [Docker labels](/engine/userguide/labels-custom-metadata.md). +You can use either an array or a dictionary. + +It's recommended that you use reverse-DNS notation to prevent your labels from conflicting with +those used by other software. + + build: + context: . + labels: + com.example.description: "Accounting webapp" + com.example.department: "Finance" + com.example.label-with-empty-value: "" + + + build: + context: . + labels: + - "com.example.description=Accounting webapp" + - "com.example.department=Finance" + - "com.example.label-with-empty-value" + ### cap_add, cap_drop Add or drop container capabilities. @@ -922,11 +947,17 @@ then read-write will be used. - restart: always - restart: on-failure -### cpu\_shares, cpu\_quota, cpuset, domainname, hostname, ipc, mac\_address, mem\_limit, memswap\_limit, mem\_swappiness, mem\_reservation, oom_score_adj, privileged, read\_only, shm\_size, stdin\_open, tty, user, working\_dir +### cpu_count, cpu_percent, cpu\_shares, cpu\_quota, cpus, cpuset, domainname, hostname, ipc, mac\_address, mem\_limit, memswap\_limit, mem\_swappiness, mem\_reservation, 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. +> **Note:** The following options were added in [version 2.2](compose-versioning.md#version-22): +> `cpu_count`, `cpu_percent`, `cpus`. + + cpu_count: 2 + cpu_percent: 50 + cpus: 0.5 cpu_shares: 73 cpu_quota: 50000 cpuset: 0,1 diff --git a/compose/compose-file/compose-versioning.md b/compose/compose-file/compose-versioning.md index fdcb2daf54..686b3669e0 100644 --- a/compose/compose-file/compose-versioning.md +++ b/compose/compose-file/compose-versioning.md @@ -188,7 +188,8 @@ between services and startup order. ### Version 2.1 An upgrade of [version 2](#version-2) that introduces new parameters only -available with Docker Engine version **1.12.0+** +available with Docker Engine version **1.12.0+**. Version 2.1 files are +supported by **Compose 1.9.0+** Introduces the following additional parameters: @@ -204,8 +205,9 @@ Introduces the following additional parameters: ### Version 2.2 An upgrade of [version 2.1](#version-21) that introduces new parameters only -available with Docker Engine version **1.13.0+**. This version also allows -to specify default scale numbers inside the service's configuration. +available with Docker Engine version **1.13.0+**. Version 2.2 files are +supported by **Compose 1.13.0+**. This version also allows you to specify +default scale numbers inside the service's configuration. Introduces the following additional parameters: @@ -224,6 +226,17 @@ several more. - Added: [deploy](index.md#deploy) +### Version 3.3 + +An upgrade of [version 3](#version-3) that introduces new parameters only available +with Docker Engine version **17.06.0+** + +Introduces the following additional parameters: + +- [build `labels`](index.md#build) +- [`credential_spec`](index.md#credential_spec) +- [`configs`](index.md#configs) + ## Upgrading ### Version 2.x to 3.x diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index c68b3aab21..ec97fd879c 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -177,6 +177,31 @@ A list of images that the engine will use for cache resolution. - alpine:latest - corp/web_app:3.14 +#### labels + +> **Note:** This option is new in v3.3 + +Add metadata to the resulting image using [Docker labels](/engine/userguide/labels-custom-metadata.md). +You can use either an array or a dictionary. + +It's recommended that you use reverse-DNS notation to prevent your labels from conflicting with +those used by other software. + + build: + context: . + labels: + com.example.description: "Accounting webapp" + com.example.department: "Finance" + com.example.label-with-empty-value: "" + + + build: + context: . + labels: + - "com.example.description=Accounting webapp" + - "com.example.department=Finance" + - "com.example.label-with-empty-value" + ### cap_add, cap_drop Add or drop container capabilities. @@ -228,6 +253,18 @@ an error. > [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md) > with a (version 3) Compose file. +### credential_spec + +> **Note:** this option was added in v3.3 + +Configure the credential spec for managed service account (Windows only). + + credential_spec: + file: c:/WINDOWS/my-credential-spec.txt + + credential_spec: + registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs + ### deploy > **[Version 3](compose-versioning.md#version-3) only.**