- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.8k
Description
Issue Description
It seems when a rootless container is created attached to a network, the hosts resolv.conf search domain is discarded. if a rootless container is spawned without a network, it has the expected functionality of inheriting the search domain from the host.
I originally created this issue in containers/netavark#1133, however @Luap99 indiciated it is both still an issue, and it is an issue in podman itself, not netavark.
on host:
mphillips81@mmp-pw-dev ~/repos/ose (main)✗ % cat /etc/resolv.conf
options attempts:1 timeout:2
search foo.com bar.com 
on podman:
mphillips81@mmp-pw-dev ~/repos/ose (main)✗ % docker run -it  --network=ose_default obfuscated.com/rhel7-dpkg:latest /bin/sh
sh-4.2# cat /etc/resolv.conf
search dns.podman
nameserver 10.89.4.1
options attempts:1 timeout:2
sh-4.2# exit
mphillips81@mmp-pw-dev ~/repos/ose (main)✗ % docker run -it  obfuscated.com/rhel7-dpkg:latest /bin/sh
sh-4.2# cat /etc/resolv.conf
search foo.com  bar.com 
nameserver 10.0.2.3
nameserver 10.10.10.10
nameserver 10.10.10.11
options attempts:1 timeout:2
sh-4.2# exit
sorry for the obfuscated bits, it should be reproducible with any image.
when run via docker the search domains are maintained as expected, both with and without network.
Steps to reproduce the issue
Steps to reproduce the issue
- create a rootless rhel container attached to a network
- cat /etc/resolv.conf
- observe search domains are missing
Describe the results you received
resolv.conf search domains are missing.
Describe the results you expected
resolv.conf search domains are maintained.
podman info output
mphillips81-dev-mse.pw1.bcc.bloomberg.com /root # podman version
Client:       Podman Engine
Version:      4.9.4-rhel
API Version:  4.9.4-rhel
Go Version:   go1.21.11 (Red Hat 1.21.11-1.el9_4)
Built:        Thu Aug  8 08:51:41 2024
OS/Arch:      linux/amd64Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
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