Replies: 2 comments 6 replies
-
This is pretty much what --no-hosts means. Podman doesn't create anything we just keep the images hosts file as is and don't over mount it without our custom one (the default). As such podman cannot add any entries, I mean sure technically we can write into the images content but it would be very ugly so we do not do that. base_hosts_file on the other hand just serves as a base for host entries we copy up into the new hosts file. In does not effect the additional podman entries and just serves as a base. And yes you are right the localhost entries are always added because apparently this is what docker did and users complained as there host hosts file didn't include them so they wanted podman to always add them for the container. If you like to clarify the docs PRs are always welcome. |
Beta Was this translation helpful? Give feedback.
-
Hello, well after some searching and stracing I see that thanks for your help -- |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
running
podman-4.4.1
onRHEL 8.8
orpodman-5.1.0
onFedora 40
:podman-run(1)
states:containers.conf(5)
states:as a newcomer to those options I find the described semantics ambiguous and not consistent with what I can test with the two options combinatorics.
From 1. I first had deduced that
--no-hosts
dealt only with adding or not the 2 container/container-to-host ip addresses (+ whatever was added with--add-host
). If this was the case,would still put host
/etc/hosts
file in the container, which obviously is not the case.It seems that
--no-hosts
just makes the value ofbase_hosts_file
irrelevant.You may reply that it's what
--no-hosts disables this, and the image's /etc/hosts will be preserved unmodified.
means but this does not seem clear to me given the first sentence.From2. (which states
are added
), I deduced that, (in case of default""
and no--no-hosts
) host's/etc/hosts
would be appended to image's rootfs/etc/hosts
, which again does not seem to be the case.It seems that host's
/etc/hosts
is "chosen" (then only container and network is added) over images's oneFinally, it seems that no matter what podman still inserts
if (granted this is extreme scenario) no
127.0.0.1
or::1
entry is found which of course is fine but differs from the default one could find for instance inubi
which is:It may be just me. Or maybe doc could use some clarification : what do you think ?
Thanks for your help
--
Thomas HUMMEL
Beta Was this translation helpful? Give feedback.
All reactions