From d38b947f150fbcaed786fc913767bd307d539aaa Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Tue, 8 Mar 2022 16:29:57 +0000 Subject: [PATCH] backport of commit 3955c33cd4ac75ba44992c91f9542d5b34953952 --- website/content/docs/drivers/docker.mdx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/website/content/docs/drivers/docker.mdx b/website/content/docs/drivers/docker.mdx index 3aefd92a52e..e8d3f94e91b 100644 --- a/website/content/docs/drivers/docker.mdx +++ b/website/content/docs/drivers/docker.mdx @@ -100,13 +100,21 @@ config { } ``` -- `dns_search_domains` - (Optional) A list of DNS search domains for the container - to use. - -- `dns_options` - (Optional) A list of DNS options for the container to use. - -- `dns_servers` - (Optional) A list of DNS servers for the container to use - (e.g. ["8.8.8.8", "8.8.4.4"]). Requires Docker v1.10 or greater. +- `dns_search_domains` - (Optional) A list of DNS search domains for + the container to use. If you are using bridge networking mode with a + `network` block in the task group, you must set all DNS options in + the `network.dns` block instead. + +- `dns_options` - (Optional) A list of DNS options for the container + to use. If you are using bridge networking mode with a `network` + block in the task group, you must set all DNS options in the + `network.dns` block instead. + +- `dns_servers` - (Optional) A list of DNS servers for the container + to use (e.g. ["8.8.8.8", "8.8.4.4"]). Requires Docker v1.10 or + greater. If you are using bridge networking mode with a `network` + block in the task group, you must set all DNS options in the + `network.dns` block instead. - `entrypoint` - (Optional) A string list overriding the image's entrypoint. @@ -257,7 +265,8 @@ config { the group `network.mode = "bridge"` you should not set the Docker config `network_mode`, or the container will be unable to reach other containers in the task group. This will also prevent [Connect]-enabled tasks from reaching - the Envoy sidecar proxy. + the Envoy sidecar proxy. You must also set any DNS options in the `network.dns` + block and not in the task configuration. - `pid_mode` - (Optional) `host` or not set (default). Set to `host` to share the PID namespace with the host. Note that this also requires the Nomad agent