From df4892c96486da88e28343f8df0797d178bfecdc Mon Sep 17 00:00:00 2001 From: Victoria Bialas Date: Mon, 24 Apr 2017 11:47:18 -0700 Subject: [PATCH] update re:container_name not supported in v3 Compose (#3003) * update re:container_name not supported in v3 Compose Signed-off-by: Victoria Bialas * added container_name to list of removed v3 options Signed-off-by: Victoria Bialas * corrected definitions per reviews Signed-off-by: Victoria Bialas * listed unsupported suboptions for deploy key Signed-off-by: Victoria Bialas --- compose/compose-file/index.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index 8412f00102..75bff4b668 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -310,9 +310,13 @@ Specify a custom container name, rather than a generated default name. container_name: my-web-container -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. +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. + +> **Note**: This option is ignored when +> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md) +> with a (version 3) Compose file. ### deploy @@ -441,6 +445,25 @@ To set labels on containers instead, use the `labels` key outside of `deploy`: labels: com.example.description: "This label will appear on all containers for the web service" +#### Not supported for `docker stack deploy` + +The following sub-options (supported for `docker compose up` and `docker compose run`) are _not supported_ for `docker stack deploy` or the `deploy` key. + +- [build](#build) +- [cgroup_parent](#cgroup-parent) +- [container_name](#containername) +- [devices](#devices) +- [dns](#devices) +- [dns_search](#dnssearch) +- [tmpfs](#tmpfs) +- [external_links](#externallinks) +- [links](#links) +- [network_mode](#networkmode) +- [security_opt](#securityopt) +- [stop_signal](#stopsignal) +- [sysctls](#sysctls) +- [userns_mode](#usernsmode) + ### devices List of device mappings. Uses the same format as the `--device` docker @@ -1212,7 +1235,7 @@ volumes: ### restart -`no` is the default restart policy, and it will not restart a container under any circumstance. When `always` is specified, the container always restarts. The `on-failure` policy restarts a container if the exit code indicates an on-failure error. +`no` is the default restart policy, and it will not restart a container under any circumstance. When `always` is specified, the container always restarts. The `on-failure` policy restarts a container if the exit code indicates an on-failure error. - restart: no - restart: always