Add `--dns-option` to `docker run` and hide `--dns-opt`
This fix is a follow up to #27567 based on: https://github.com/docker/docker/pull/27567#issuecomment-259295055 In #27567, `--dns-options` has been added to `service create/update`, together with `--dns` and `--dns-search`. The `--dns-opt` was used in `docker run`. This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide `--dns-opt`. It is still possible to use `--dns-opt` with `docker run/create`, though it will not show up in help output. This fix change `--dns-options`to --dns-option` for `docker service create` and `docker service update`. This fix also updates the docs and bash/zsh completion scripts. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Родитель
bf622eddc1
Коммит
ebacbb50ae
|
@ -1248,7 +1248,7 @@ _docker_container_run() {
|
|||
--device-write-bps
|
||||
--device-write-iops
|
||||
--dns
|
||||
--dns-opt
|
||||
--dns-option
|
||||
--dns-search
|
||||
--entrypoint
|
||||
--env -e
|
||||
|
|
|
@ -531,7 +531,7 @@ __docker_container_subcommand() {
|
|||
"($help)*--device-write-iops=[Limit the write rate (IO per second) to a device]:device:IO rate: "
|
||||
"($help)--disable-content-trust[Skip image verification]"
|
||||
"($help)*--dns=[Custom DNS servers]:DNS server: "
|
||||
"($help)*--dns-opt=[Custom DNS options]:DNS option: "
|
||||
"($help)*--dns-option=[Custom DNS options]:DNS option: "
|
||||
"($help)*--dns-search=[Custom DNS search domains]:DNS domains: "
|
||||
"($help)*"{-e=,--env=}"[Environment variables]:environment variable: "
|
||||
"($help)--entrypoint=[Overwrite the default entrypoint of the image]:entry point: "
|
||||
|
|
|
@ -50,7 +50,7 @@ Options:
|
|||
--device-write-iops value Limit write rate (IO per second) to a device (default [])
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--dns value Set custom DNS servers (default [])
|
||||
--dns-opt value Set DNS options (default [])
|
||||
--dns-option value Set DNS options (default [])
|
||||
--dns-search value Set custom DNS search domains (default [])
|
||||
--entrypoint string Overwrite the default ENTRYPOINT of the image
|
||||
-e, --env value Set environment variables (default [])
|
||||
|
|
|
@ -54,7 +54,7 @@ Options:
|
|||
--device-write-iops value Limit write rate (IO per second) to a device (default [])
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--dns value Set custom DNS servers (default [])
|
||||
--dns-opt value Set DNS options (default [])
|
||||
--dns-option value Set DNS options (default [])
|
||||
--dns-search value Set custom DNS search domains (default [])
|
||||
--entrypoint string Overwrite the default ENTRYPOINT of the image
|
||||
-e, --env value Set environment variables (default [])
|
||||
|
|
|
@ -24,7 +24,7 @@ Options:
|
|||
--constraint list Placement constraints (default [])
|
||||
--container-label list Container labels (default [])
|
||||
--dns list Set custom DNS servers (default [])
|
||||
--dns-options list Set DNS options (default [])
|
||||
--dns-option list Set DNS options (default [])
|
||||
--dns-search list Set custom DNS search domains (default [])
|
||||
--endpoint-mode string Endpoint mode (vip or dnsrr)
|
||||
-e, --env list Set environment variables (default [])
|
||||
|
|
|
@ -26,12 +26,12 @@ Options:
|
|||
--constraint-rm list Remove a constraint (default [])
|
||||
--container-label-add list Add or update a container label (default [])
|
||||
--container-label-rm list Remove a container label by its key (default [])
|
||||
--dns-add list Add or update custom DNS servers (default [])
|
||||
--dns-options-add list Add or update DNS options (default [])
|
||||
--dns-options-rm list Remove DNS options (default [])
|
||||
--dns-rm list Remove custom DNS servers (default [])
|
||||
--dns-search-add list Add or update custom DNS search domains (default [])
|
||||
--dns-search-rm list Remove DNS search domains (default [])
|
||||
--dns-add list Add or update a custom DNS server (default [])
|
||||
--dns-option-add list Add or update a DNS option (default [])
|
||||
--dns-option-rm list Remove a DNS option (default [])
|
||||
--dns-rm list Remove a custom DNS server (default [])
|
||||
--dns-search-add list Add or update a custom DNS search domain (default [])
|
||||
--dns-search-rm list Remove a DNS search domain (default [])
|
||||
--endpoint-mode string Endpoint mode (vip or dnsrr)
|
||||
--env-add list Add or update an environment variable (default [])
|
||||
--env-rm list Remove an environment variable (default [])
|
||||
|
|
|
@ -388,7 +388,7 @@ network mode a container has its own UTS namespace by default. As such
|
|||
`--hostname` is allowed in `host` network mode and will only change the
|
||||
hostname inside the container.
|
||||
Similar to `--hostname`, the `--add-host`, `--dns`, `--dns-search`, and
|
||||
`--dns-opt` options can be used in `host` network mode. These options update
|
||||
`--dns-option` options can be used in `host` network mode. These options update
|
||||
`/etc/hosts` or `/etc/resolv.conf` inside the container. No change are made to
|
||||
`/etc/hosts` and `/etc/resolv.conf` on the host.
|
||||
|
||||
|
@ -407,7 +407,7 @@ or a High Performance Web Server.
|
|||
With the network set to `container` a container will share the
|
||||
network stack of another container. The other container's name must be
|
||||
provided in the format of `--network container:<name|id>`. Note that `--add-host`
|
||||
`--hostname` `--dns` `--dns-search` `--dns-opt` and `--mac-address` are
|
||||
`--hostname` `--dns` `--dns-search` `--dns-option` and `--mac-address` are
|
||||
invalid in `container` netmode, and `--publish` `--publish-all` `--expose` are
|
||||
also invalid in `container` netmode.
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ docker-create - Create a new container
|
|||
[**--device-write-iops**[=*[]*]]
|
||||
[**--dns**[=*[]*]]
|
||||
[**--dns-search**[=*[]*]]
|
||||
[**--dns-opt**[=*[]*]]
|
||||
[**--dns-option**[=*[]*]]
|
||||
[**-e**|**--env**[=*[]*]]
|
||||
[**--entrypoint**[=*ENTRYPOINT*]]
|
||||
[**--env-file**[=*[]*]]
|
||||
|
@ -190,7 +190,7 @@ two memory nodes.
|
|||
**--dns**=[]
|
||||
Set custom DNS servers
|
||||
|
||||
**--dns-opt**=[]
|
||||
**--dns-option**=[]
|
||||
Set custom DNS options
|
||||
|
||||
**--dns-search**=[]
|
||||
|
|
|
@ -32,7 +32,7 @@ docker-run - Run a command in a new container
|
|||
[**--device-write-bps**[=*[]*]]
|
||||
[**--device-write-iops**[=*[]*]]
|
||||
[**--dns**[=*[]*]]
|
||||
[**--dns-opt**[=*[]*]]
|
||||
[**--dns-option**[=*[]*]]
|
||||
[**--dns-search**[=*[]*]]
|
||||
[**-e**|**--env**[=*[]*]]
|
||||
[**--entrypoint**[=*ENTRYPOINT*]]
|
||||
|
@ -260,7 +260,7 @@ See **config-json(5)** for documentation on using a configuration file.
|
|||
**--dns-search**=[]
|
||||
Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
|
||||
|
||||
**--dns-opt**=[]
|
||||
**--dns-option**=[]
|
||||
Set custom DNS options
|
||||
|
||||
**--dns**=[]
|
||||
|
|
Загрузка…
Ссылка в новой задаче