Skip to content

Commit

Permalink
Document Docker extra_hosts behaviour post v1.1.3 (#11079)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com>
  • Loading branch information
lgfa29 and DerekStrickland committed Sep 1, 2021
1 parent d4bc049 commit cb0b2f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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 is more than one task within the same group. Refer to the
[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

0 comments on commit cb0b2f5

Please sign in to comment.