-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Mac: current HEAD errors out on --add-host
using host-gateway
with "host containers internal IP address is empty"
#21681
Comments
--add-host
using host-gateway
with "host containers internal IP address is empty"
A friendly reminder that this issue had no activity for 30 days. |
Hi, issue is still there with podman 5.0.0 installed with
is it fixable at least? |
Sure it is fixable but it is not so trival, the machine networking works differently. We do not use /etc/hosts but rather rely on gvproxy to serve the host.contianers.internal hostname so podman itself doesn't know the ip first hand. However it should be possible to make a dns request from podman for this name so that we can then add the specified entry to /etc/hosts with the returned ip. |
This is also exposed by gvproxy over the |
Is there any workaround to resolve this? |
I found a workaround so I can handle both docker and podman users:
|
This returns the ip of the subnet gateway which is not the host ip for podman machine nor would this ip makes sense for rootless podman so I don't see how this would be a replacement. |
Well, it works for my case where I need several containers to communicate over the host network. I use it to replace |
I suspect this is the reason for k3d not working on podman, at least not on macos |
I have the same (or similar) problem, when I create/start a container without root. Specifically, I'm on Fedora and creating & trying to start a Open WebUI container (a GUI for Ollama, local LLM).
What fixes the issue, is creating the container as Root. But I wish Non-Root as that allows me to use a nice graphical Podman manager app called "Pods" |
@cyangalaxy Are you using podman machine? If not it is not the same issue. |
No I'm not (I'm on Linux which doesn't have that). Should I create a new issue for my problem? I haven't found a solution for my problem (other than running as Root). |
@cyangalaxy If you are using pasta (default rootless networking since 5.0) then this is expected unless you have a second host ip available, see #22653 |
Ok but is there any workaround right now for users working with:
Thanks |
@andreaippo The quoted issue lists plenty of workarounds. |
I tried the first one mentioned here, to no avail: I created ~/.config/containers/containers.conf with the following:
How can I be sure this change is effective? Next, I have started my container on a bridge network:
When I send a specific curl to my-service:8090, it contacts another service running on my host at :8080, using
What am I doing wrong? Thanks Update: since this is OT, opened a new issue #23776 |
@andreaippo This is off topic to this issue (as this is about macos), please create a new discussion if you need support. |
Issue Description
With current HEAD (Git hash bbd4476), an error occurs when using the
--add-host
option withhost-gateway
special IP designator, even though this is supposed to be supported with #14390Steps to reproduce the issue
Steps to reproduce the issue
export CONTAINERS_MACHINE_PROVIDER=applehv
podman machine init --rootful
podman run --add-host foobar:host-gateway -it busybox
Describe the results you received
Describe the results you expected
Expected a running container with a mapping for domain
foobar
in its hosts filepodman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: