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

[feature request] Extra hosts in the /etc/hosts #98

Closed
Oloremo opened this issue Jun 29, 2021 · 3 comments
Closed

[feature request] Extra hosts in the /etc/hosts #98

Oloremo opened this issue Jun 29, 2021 · 3 comments

Comments

@Oloremo
Copy link

Oloremo commented Jun 29, 2021

Hi,

Nomad recently fixed\implement long-standing issue with bridge network Docker workloads not being able to add extra entries into the /etc/hosts.

hashicorp/nomad#10766

I wonder if containerd driver could support this?

Some applications are dependant on some /etc/hosts entries in our case and we have to do a lot of hacks to workaround it.

@shishir-a412ed
Copy link
Contributor

@Oloremo You can add extra hosts to /etc/hosts in the container using extra_hosts flag. What is missing in containerd-driver?

@Oloremo
Copy link
Author

Oloremo commented Jun 29, 2021

Ops, I think I assumed it didn't work for all bridged network workloads. Lemme re-check.

@shishir-a412ed
Copy link
Contributor

Sure. The important thing here is if you set host_network to true, you get a copy of host's /etc/hosts and extra_hosts get added to that. However, if host_network is false, you start with a default /etc/hosts build for the container and extra_hosts are added to the default version.

Code link here

@Oloremo Oloremo closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants