Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Docker extra_hosts behaviour post v1.1.3 #11079

Merged
merged 2 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion website/content/docs/drivers/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ config {
- `entrypoint` - (Optional) A string list overriding the image's entrypoint.

- `extra_hosts` - (Optional) A list of hosts, given as host:IP, to be added to
`/etc/hosts`.
`/etc/hosts`. This option may not work as expected in `bridge` network mode
when there are more than one task within the same group. Refer to the
lgfa29 marked this conversation as resolved.
Show resolved Hide resolved
[upgrade guide][upgrade_guide_extra_hosts] for more information.

- `force_pull` - (Optional) `true` or `false` (default). Always pull most recent image
instead of using existing local image. Should be set to `true` if repository tags
Expand Down Expand Up @@ -1149,6 +1151,7 @@ Windows is relatively new and rapidly evolving you may want to consult the
[cap_add]: /docs/drivers/docker#cap_add
[cap_drop]: /docs/drivers/docker#cap_drop
[no_net_raw]: /docs/upgrade/upgrade-specific#nomad-1-1-0-rc1-1-0-5-0-12-12
[upgrade_guide_extra_hosts]: /docs/upgrade/upgrade-specific#docker-driver
[docker_caps]: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
[allow_caps]: /docs/drivers/docker#allow_caps
[Connect]: /docs/job-specification/connect
Expand Down
7 changes: 7 additions & 0 deletions website/content/docs/upgrade/upgrade-specific.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ from the task directory to `/etc/hosts` within the task. In Nomad 1.1.3 the
source for the bind mount was moved to the allocation directory so that it is
shared between all tasks in an allocation.

Please note that this change may prevent [`extra_hosts`] values from being
properly set in each task when there are multiple tasks within the same group.
When using `extra_hosts` with Consul Connect in `bridge` network mode, you
should set the hosts values in the [`sidecar_task.config`] block instead.

## Nomad 1.1.0

#### Enterprise licenses
Expand Down Expand Up @@ -1160,6 +1165,7 @@ deleted and then Nomad 0.3.0 can be launched.
[preemption-api]: /api-docs/operator#update-scheduler-configuration
[preemption]: /docs/internals/scheduling/preemption
[proxy_concurrency]: /docs/job-specification/sidecar_task#proxy_concurrency
[`sidecar_task.config`]: /docs/job-specification/sidecar_task#config
[reserved]: /docs/configuration/client#reserved-parameters
[task-config]: /docs/job-specification/task#config
[tls-guide]: https://learn.hashicorp.com/tutorials/nomad/security-enable-tls
Expand All @@ -1177,6 +1183,7 @@ deleted and then Nomad 0.3.0 can be launched.
[`CAP_NET_RAW`]: https://security.stackexchange.com/a/128988
[`linux capabilities`]: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
[`allow_caps`]: /docs/drivers/docker#allow_caps
[`extra_hosts`]: /docs/drivers/docker#extra_hosts
[no_net_raw]: /docs/upgrade/upgrade-specific#nomad-1-1-0-rc1-1-0-5-0-12-12
[allow_caps_exec]: /docs/drivers/exec#allow_caps
[allow_caps_java]: /docs/drivers/java#allow_caps
Expand Down