From ebacbb50aec7281467daf59980ccb6d81724c050 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Tue, 8 Nov 2016 18:29:10 -0800 Subject: [PATCH] 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 --- contrib/completion/bash/docker | 2 +- contrib/completion/zsh/_docker | 2 +- docs/reference/commandline/create.md | 2 +- docs/reference/commandline/run.md | 2 +- docs/reference/commandline/service_create.md | 2 +- docs/reference/commandline/service_update.md | 12 ++++++------ docs/reference/run.md | 4 ++-- man/docker-create.1.md | 4 ++-- man/docker-run.1.md | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 2b363ab3bc..46edab76d6 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -1248,7 +1248,7 @@ _docker_container_run() { --device-write-bps --device-write-iops --dns - --dns-opt + --dns-option --dns-search --entrypoint --env -e diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 615ebfbf8c..1537e76b8e 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -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: " diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index e662132092..9fdfd4c205 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -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 []) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 0f21ca76be..d744c23a4d 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -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 []) diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index f68ebb7b40..2893c84252 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -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 []) diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 261f1c3518..c5104103cc 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -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 []) diff --git a/docs/reference/run.md b/docs/reference/run.md index 9bb6cfc11e..cda3957570 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -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:`. 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. diff --git a/man/docker-create.1.md b/man/docker-create.1.md index 767a7fc307..8bb162c2c3 100644 --- a/man/docker-create.1.md +++ b/man/docker-create.1.md @@ -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**=[] diff --git a/man/docker-run.1.md b/man/docker-run.1.md index ebede9a64f..5224895c91 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -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**=[]