mirror of https://github.com/docker/docs.git
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:
parent
f09ef4ae26
commit
df4892c964
|
@ -310,9 +310,13 @@ Specify a custom container name, rather than a generated default name.
|
||||||
|
|
||||||
container_name: my-web-container
|
container_name: my-web-container
|
||||||
|
|
||||||
Because Docker container names must be unique, you cannot scale a service
|
Because Docker container names must be unique, you cannot scale a service beyond
|
||||||
beyond 1 container if you have specified a custom name. Attempting to do so
|
1 container if you have specified a custom name. Attempting to do so results in
|
||||||
results in an error.
|
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
|
### deploy
|
||||||
|
|
||||||
|
@ -441,6 +445,25 @@ To set labels on containers instead, use the `labels` key outside of `deploy`:
|
||||||
labels:
|
labels:
|
||||||
com.example.description: "This label will appear on all containers for the web service"
|
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
|
### devices
|
||||||
|
|
||||||
List of device mappings. Uses the same format as the `--device` docker
|
List of device mappings. Uses the same format as the `--device` docker
|
||||||
|
@ -1212,7 +1235,7 @@ volumes:
|
||||||
|
|
||||||
### restart
|
### 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: no
|
||||||
- restart: always
|
- restart: always
|
||||||
|
|
Loading…
Reference in New Issue