A way to a container in a guest VM connect to a host's container? #24376
Replies: 1 comment
-
Not sure if changes related to version 5.3 afected this, but now I'm able to connect. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I was wondering if it is possible to connect to a container, say a Postgres container, that is running on a host machine, MacOS in my case, from another container running a guest VM; again, in my case is an Arch Linux instance, configured imported to UTM.
The UTM Arch Linux instance is configured to share the host's (MacOS) network. For example, the host would be "192.168.0.X" and the guest "192.168.64.Y".
Both host and guest have podman installed, and are used in rootless mode (the default).
The host container is started issuing:
Also, it seems that
--net host
odes not work with port mappings:And I try to connect to this very same container within the guest VM, through another container, like so:
The message "Is the server running on that host and accepting TCP/IP connections?" gave me the idea to configure port forwarding in UTM, to no avail.
I'm not quite sure what to look for or what am I missing. This tutorial shows what I'm trying to achieve: https://pinter.org/archives/7719
Maybe Caddy can come in handy here?
[Update on --net=host]
Oh, it is expected that the mappings won't work:
Beta Was this translation helpful? Give feedback.
All reactions