Skip to content

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

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

vieux merged 1 commit into
moby:masterfrom
unclejack:disallow_dns_with_net_host

Conversation

@unclejack

Copy link
Copy Markdown
Contributor

Fixes #7326

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)
@LK4D4

LK4D4 commented Aug 28, 2014

Copy link
Copy Markdown
Contributor

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

@SvenDowideit

Copy link
Copy Markdown
Contributor

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

@fredlf

fredlf commented Aug 29, 2014

Copy link
Copy Markdown
Contributor

They look fine to me. LGTM

@crosbymichael

Copy link
Copy Markdown
Contributor

LGTM

1 similar comment
@vieux

vieux commented Sep 1, 2014

Copy link
Copy Markdown
Contributor

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

tarnfeld commented Sep 3, 2014

Copy link
Copy Markdown

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
Copy Markdown
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