-
Notifications
You must be signed in to change notification settings - Fork 779
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
How to have a custom /etc/hosts in image? #3808
Comments
I think you have to run with |
Hi @Luap99
|
dns_servers = ["custom-dns1", "custom-dns2"] replace
see docs of |
@ttys3 This answer was unrelated to a actual question. |
If you don't want the /etc/hosts file to be modified, you can use the --no-hosts option. |
This option does not exists for podman build |
Ok, I guess we should add that. |
A friendly reminder that this issue had no activity for 30 days. |
Users want to turn off addition of /etc/hosts file while building container images, this would allow them to customize the /etc/hosts file within the image. Fixes: containers#3808 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Users want to turn off addition of /etc/hosts file while building container images, this would allow them to customize the /etc/hosts file within the image. Fixes: containers#3808 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Users want to turn off addition of /etc/hosts file while building container images, this would allow them to customize the /etc/hosts file within the image. Fixes: containers#3808 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Users want to turn off addition of /etc/hosts file while building container images, this would allow them to customize the /etc/hosts file within the image. Fixes: containers#3808 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Users want to turn off addition of /etc/hosts file while building container images, this would allow them to customize the /etc/hosts file within the image. Fixes: containers#3808 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Not sure if this is a bug or intended. I find conflicting information regarding this so please excuse if I didn't file enough information.
I have code in Dockerfile to create a custom /etc/hosts file. But, saving and extracting the built image from "podman build" shows the /etc/hosts file is empty. I want to create my own /etc/hosts and use "podman run --no-hosts" but the build process seems to zero out my /etc/hosts file.
The description for --no-hosts is:
Do not create /etc/hosts within the container, instead use the version from the image
But, if my /etc/hosts is emptied at build time how can I
use the version from the image
?The text was updated successfully, but these errors were encountered: