From dc2ae46f926b9d5b1a9ea5e28fb211c5a7f53dab Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 17 Mar 2020 11:01:01 +0100 Subject: [PATCH] compose-file v2: re-order topics to be the same as v3 Signed-off-by: Sebastiaan van Stijn --- compose/compose-file/compose-file-v2.md | 71 +++++++++++++------------ 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/compose/compose-file/compose-file-v2.md b/compose/compose-file/compose-file-v2.md index 38c71e5be0..6bbeb4b5dd 100644 --- a/compose/compose-file/compose-file-v2.md +++ b/compose/compose-file/compose-file-v2.md @@ -143,20 +143,6 @@ image: webapp:tag This results in an image named `webapp` and tagged `tag`, built from `./dir`. -#### cache_from - -> Added in [version 2.2](compose-versioning.md#version-22) file format - -A list of images that the engine uses for cache resolution. - -```yaml -build: - context: . - cache_from: - - alpine:latest - - corp/web_app:3.14 -``` - #### context > [Version 2 file format](compose-versioning.md#version-2) and up. In version 1, just use @@ -242,6 +228,20 @@ args: > **Note**: YAML boolean values (`true`, `false`, `yes`, `no`, `on`, `off`) must > be enclosed in quotes, so that the parser interprets them as strings. +#### cache_from + +> Added in [version 2.2](compose-versioning.md#version-22) file format + +A list of images that the engine uses for cache resolution. + +```yaml +build: + context: . + cache_from: + - alpine:latest + - corp/web_app:3.14 +``` + #### extra_hosts Add hostname mappings at build-time. Use the same values as the docker client `--add-host` parameter. @@ -367,6 +367,14 @@ cap_drop: - SYS_ADMIN ``` +### cgroup_parent + +Specify an optional parent cgroup for the container. + +```yaml +cgroup_parent: m-executor-abcd +``` + ### command Override the default command. @@ -382,14 +390,6 @@ The command can also be a list, in a manner similar to command: ["bundle", "exec", "thin", "-p", "3000"] ``` -### cgroup_parent - -Specify an optional parent cgroup for the container. - -```yaml -cgroup_parent: m-executor-abcd -``` - ### container_name Specify a custom container name, rather than a generated default name. @@ -548,19 +548,6 @@ dns_search: - dc2.example.com ``` -### tmpfs - -Mount a temporary file system inside the container. Can be a single value or a list. - -```yaml -tmpfs: /run -``` -```yaml -tmpfs: - - /run - - /tmp -``` - ### entrypoint Override the default entrypoint. @@ -1359,6 +1346,20 @@ sysctls: - net.ipv4.tcp_syncookies=0 ``` +### tmpfs + +Mount a temporary file system inside the container. Can be a single value or a list. + +```yaml +tmpfs: /run +``` + +```yaml +tmpfs: + - /run + - /tmp +``` + ### ulimits Override the default ulimits for a container. You can either specify a single