diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index be229039d3..9766a03115 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -533,6 +533,7 @@ _docker_daemon() { --default-ulimit --dns --dns-search + --dns-opt --exec-driver -e --exec-opt --exec-root @@ -1124,6 +1125,7 @@ _docker_run() { --cpu-shares -c --device --dns + --dns-opt --dns-search --entrypoint --env -e diff --git a/contrib/completion/fish/docker.fish b/contrib/completion/fish/docker.fish index 7dcc554139..ad76de3ce6 100644 --- a/contrib/completion/fish/docker.fish +++ b/contrib/completion/fish/docker.fish @@ -49,6 +49,7 @@ complete -c docker -f -n '__fish_docker_no_subcommand' -l bip -d "Use this CIDR complete -c docker -f -n '__fish_docker_no_subcommand' -s D -l debug -d 'Enable debug mode' complete -c docker -f -n '__fish_docker_no_subcommand' -s d -l daemon -d 'Enable daemon mode' complete -c docker -f -n '__fish_docker_no_subcommand' -l dns -d 'Force Docker to use specific DNS servers' +complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-opt -d 'Force Docker to use specific DNS options' complete -c docker -f -n '__fish_docker_no_subcommand' -l dns-search -d 'Force Docker to use specific DNS search domains' complete -c docker -f -n '__fish_docker_no_subcommand' -s e -l exec-driver -d 'Force the Docker runtime to use a specific exec driver' complete -c docker -f -n '__fish_docker_no_subcommand' -l exec-opt -d 'Set exec driver options' @@ -122,6 +123,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cidfile -d ' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l cpuset -d 'CPUs in which to allow execution (0-3, 0,1)' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns -d 'Set custom DNS servers' +complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)" complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)" complete -c docker -A -f -n '__fish_seen_subcommand_from create' -s e -l env -d 'Set environment variables' complete -c docker -A -f -n '__fish_seen_subcommand_from create' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image' @@ -309,6 +311,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l cpuset -d 'CPUs complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s d -l detach -d 'Detached mode: run the container in the background and print the new container ID' complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l device -d 'Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)' complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns -d 'Set custom DNS servers' +complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-opt -d "Set custom DNS options (Use --dns-opt='' if you don't wish to set options)" complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l dns-search -d "Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)" complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s e -l env -d 'Set environment variables' complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l entrypoint -d 'Overwrite the default ENTRYPOINT of the image' diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 448dac9d59..52b5c75036 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -226,8 +226,9 @@ __docker_subcommand() { "($help)*--cap-drop=-[Drop Linux capabilities]:capability: " "($help)--cidfile=-[Write the container ID to the file]:CID file:_files" "($help)*--device=-[Add a host device to the container]:device:_files" - "($help)*--dns=-[Set custom dns servers]:dns server: " - "($help)*--dns-search=-[Set custom DNS search domains]:dns domains: " + "($help)*--dns=-[Set custom DNS servers]:DNS server: " + "($help)*--dns-opt=-[Set custom DNS options]:DNS option: " + "($help)*--dns-search=-[Set custom DNS search domains]:DNS domains: " "($help)*"{-e,--env=-}"[Set environment variables]:environment variable: " "($help)--entrypoint=-[Overwrite the default entrypoint of the image]:entry point: " "($help)*--env-file=-[Read environment variables from a file]:environment file:_files" @@ -599,7 +600,8 @@ _docker() { "($help)--default-gateway[Container default gateway IPv4 address]:IPv4 address: " \ "($help)--default-gateway-v6[Container default gateway IPv6 address]:IPv6 address: " \ "($help)*--dns=-[DNS server to use]:DNS: " \ - "($help)*--dns-search=-[DNS search domains to use]" \ + "($help)*--dns-search=-[DNS search domains to use]:DNS search: " \ + "($help)*--dns-opt=-[DNS options to use]:DNS option: " \ "($help)*--default-ulimit=-[Set default ulimit settings for containers]:ulimit: " \ "($help -e --exec-driver)"{-e,--exec-driver=-}"[Exec driver to use]:driver:(native lxc windows)" \ "($help)*--exec-opt=-[Set exec driver options]:exec driver options: " \ diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 7c64d7297d..ba8b33a387 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -31,6 +31,7 @@ Creates a new container. --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) --device=[] Add a host device to the container --dns=[] Set custom DNS servers + --dns-opt=[] Set custom DNS options --dns-search=[] Set custom DNS search domains -e, --env=[] Set environment variables --entrypoint="" Overwrite the default ENTRYPOINT of the image diff --git a/docs/reference/commandline/daemon.md b/docs/reference/commandline/daemon.md index 22394b72a8..1fbfdcde7d 100644 --- a/docs/reference/commandline/daemon.md +++ b/docs/reference/commandline/daemon.md @@ -23,6 +23,7 @@ weight=1 --default-gateway="" Container default gateway IPv4 address --default-gateway-v6="" Container default gateway IPv6 address --dns=[] DNS server to use + --dns-opt=[] DNS options to use --dns-search=[] DNS search domains to use --default-ulimit=[] Set default ulimit settings for containers -e, --exec-driver="native" Exec driver to use diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index c7726497cc..313f61558b 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -30,6 +30,7 @@ weight=1 -d, --detach=false Run container in background and print container ID --device=[] Add a host device to the container --dns=[] Set custom DNS servers + --dns-opt=[] Set custom DNS options --dns-search=[] Set custom DNS search domains -e, --env=[] Set environment variables --entrypoint="" Overwrite the default ENTRYPOINT of the image diff --git a/docs/reference/run.md b/docs/reference/run.md index a115a6bb66..d00c7d9bc6 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -330,8 +330,8 @@ traffic will be routed though this bridge to the container. With the networking mode set to `host` a container will share the host's network stack and all interfaces from the host will be available to the container. The container's hostname will match the hostname on the host -system. Note that `--add-host` `--hostname` `--dns` `--dns-search` and -`--mac-address` is invalid in `host` netmode. +system. Note that `--add-host` `--hostname` `--dns` `--dns-search` +`--dns-opt` and `--mac-address` are invalid in `host` netmode. Compared to the default `bridge` mode, the `host` mode gives *significantly* better networking performance since it uses the host's native networking stack @@ -348,9 +348,9 @@ or a High Performance Web Server. With the networking mode 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 `--net container:`. Note that `--add-host` -`--hostname` `--dns` `--dns-search` and `--mac-address` is invalid -in `container` netmode, and `--publish` `--publish-all` `--expose` are also -invalid in `container` netmode. +`--hostname` `--dns` `--dns-search` `--dns-opt` and `--mac-address` are +invalid in `container` netmode, and `--publish` `--publish-all` `--expose` are +also invalid in `container` netmode. Example running a Redis container with Redis binding to `localhost` then running the `redis-cli` command and connecting to the Redis server over the diff --git a/man/docker-create.1.md b/man/docker-create.1.md index 21f411a716..e82ac3381c 100644 --- a/man/docker-create.1.md +++ b/man/docker-create.1.md @@ -21,6 +21,7 @@ docker-create - Create a new container [**--device**[=*[]*]] [**--dns**[=*[]*]] [**--dns-search**[=*[]*]] +[**--dns-opt**[=*[]*]] [**-e**|**--env**[=*[]*]] [**--entrypoint**[=*ENTRYPOINT*]] [**--env-file**[=*[]*]] @@ -118,6 +119,9 @@ two memory nodes. **--dns**=[] Set custom DNS servers +**--dns-opt**=[] + Set custom DNS options + **--dns-search**=[] Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) diff --git a/man/docker-inspect.1.md b/man/docker-inspect.1.md index f7faf4a7b2..3d1db2ed3e 100644 --- a/man/docker-inspect.1.md +++ b/man/docker-inspect.1.md @@ -123,6 +123,7 @@ To get information on a container use its ID or instance name: "PublishAllPorts": false, "Dns": null, "DnsSearch": null, + "DnsOptions": null, "ExtraHosts": null, "VolumesFrom": null, "Devices": [], diff --git a/man/docker-run.1.md b/man/docker-run.1.md index 532f943f71..ebb65d71c7 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -21,6 +21,7 @@ docker-run - Run a command in a new container [**-d**|**--detach**[=*false*]] [**--device**[=*[]*]] [**--dns**[=*[]*]] +[**--dns-opt**[=*[]*]] [**--dns-search**[=*[]*]] [**-e**|**--env**[=*[]*]] [**--entrypoint**[=*ENTRYPOINT*]] @@ -185,6 +186,9 @@ stopping the process by pressing the keys CTRL-P CTRL-Q. **--dns-search**=[] Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain) +**--dns-opt**=[] + Set custom DNS options + **--dns**=[] Set custom DNS servers diff --git a/man/docker.1.md b/man/docker.1.md index 50c9baa207..17b92849bf 100644 --- a/man/docker.1.md +++ b/man/docker.1.md @@ -56,6 +56,9 @@ To see the man page for a command run **man docker **. **--dns**="" Force Docker to use specific DNS servers +**--dns-opt**=[] + DNS options to use. + **--dns-search**=[] DNS search domains to use.