Replies: 4 comments 1 reply
-
Please provide a proper reproducer with commands so it is clear what you are doing. In general podman reads /etc/resolv.conf so you would need to switch the mount namespace as well to provide an alternate resolve.conf file. Note that switching namesapces in general can cause quite a lot problems with podman as we need a single mount namespace in order to properly mount/unmount the storage. |
Beta Was this translation helpful? Give feedback.
-
The idea is that I'm running a separate network namespace on my workstation for VPN access. I want to run a rootless container in that network namespace, which will be able to access the VPN. It does work, but I have to manually provide the configuration via --dns arguments.
I expect to see nameserver 1.1.1.1 in the last step. |
Beta Was this translation helpful? Give feedback.
-
yeah that is simply impossible, rootless podman must run within a single user + mount namesapce. Each rootless podman command thus joins the same user + mount namespace so they always see the same files and ignore the parent mount namespace. And if you use something like |
Beta Was this translation helpful? Give feedback.
-
I see. Is there any other solution that would allow me to connect rootless containers to another network namespace? I don't mind performing additional configuration as root as long as I can automate it, but the goal is to be able to somehow be able to connect some containers to the network configured in my namespace |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
By default, Podman passes host resolv.conf entries to the container instead of taking it from the network namespace it's executed in
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
At step 4 the contents are the same as /etc/resolv.conf outside the network namespace.
Describe the results you expected
/etc/resolv.conf should be the same as configuration in the network namespace
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
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
Beta Was this translation helpful? Give feedback.
All reactions