Skip to content

disallow net=host and net=container with links and dns#7780

Merged
vieux merged 1 commit intomoby:masterfrom
unclejack:disallow_dns_with_net_host
Sep 1, 2014
Merged

disallow net=host and net=container with links and dns#7780
vieux merged 1 commit intomoby:masterfrom
unclejack:disallow_dns_with_net_host

Conversation

@unclejack
Copy link
Contributor

Fixes #7326

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
@LK4D4
Copy link
Contributor

LK4D4 commented Aug 28, 2014

I wait when we'll can write tests for such changes :)
LGTM

@SvenDowideit
Copy link
Contributor

@fredlf you might like to tweak the error text? :)

@fredlf
Copy link
Contributor

fredlf commented Aug 29, 2014

They look fine to me. LGTM

@crosbymichael
Copy link
Contributor

LGTM

1 similar comment
@vieux
Copy link
Contributor

vieux commented Sep 1, 2014

LGTM

vieux added a commit that referenced this pull request Sep 1, 2014
disallow net=host and net=container with links and dns
@vieux vieux merged commit 40cc889 into moby:master Sep 1, 2014
@unclejack unclejack deleted the disallow_dns_with_net_host branch September 2, 2014 09:31
@tarnfeld
Copy link

tarnfeld commented Sep 3, 2014

Could anyone describe why --net=host and --dns=... are mutually exclusive? I'd like to use a custom DNS server inside my container, while being able to share the TCP/IP networking stack of the host. This seems like a reasonable use case to me.

Any workarounds?

@unclejack
Copy link
Contributor Author

@tarnfeld --net=host means that the host's network stack is being used, including resolvers and anything else related to the network stack. These flag combinations have been blacklisted because these setups aren't supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--dns is ignored when --net=host

7 participants