update re:container_name not supported in v3 Compose (#3003)

* update re:container_name not supported in v3 Compose

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* added container_name to list of removed v3 options

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* corrected  definitions per reviews

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* listed unsupported suboptions for deploy key

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
This commit is contained in:
Victoria Bialas 2017-04-24 11:47:18 -07:00 committed by GitHub
parent f09ef4ae26
commit df4892c964
1 changed files with 27 additions and 4 deletions

View File

@ -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