-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Flag --dns does not set /etc/resolv.conf when using another containers network #3553
Comments
I'm assuming you're running rootless? |
Ahhh - I think I know what we might be seeing here.
I'd make some changes to resolv.conf in one container and see if they're reflected in the other container. That would be a surefire way to tell. |
The following scenarios are as root: Original test: leading pause container has no usable network/DNS; command line --dns is ignored for dependent container and 1.1.1.1 and 1.0.0.1 are injected. If I create the pause container with a working /etc/resolv.conf; the command line --dns is ignored and the DNS from the leading container is injected. Is this the intended behaviour? |
This sounds intended, though the way we're handling |
If the behaviour for |
What does Docker do? |
What do we do with Pods? |
Docker follows @mheon first option:
|
@QiWang19 Could you make all of the --dns commands conflict with --net = container:* calls. |
Close containers#3553 This PR makes --dns, --dns-option, --dns-search, and --network not set to host flag mutually exclusive for podman build and create. Returns conflict error if both flags are set. Signed-off-by: Qi Wang <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I am creating a container with
--dns <MYDNS1> -- dns <MYDNS2> --network container:another
./etc/resolv.conf
is written with1.1.1.1
and1.0.0.1
, instead of the expected<MYDNS1>
,<MYDNS2>
Steps to reproduce the issue:
Describe the results you received:
The dependent container uses the nameserver of the host.
Describe the results you expected:
The dependent container uses the nameserver specified with
--dns X.X.X.X
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: