Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Supply a --dns-search to blank the inherited resolv.conf search #175

Merged
merged 1 commit into from
Nov 11, 2014

Conversation

squaremo
Copy link
Contributor

In the absence of either a --dns or --dns-search argument,
Docker will write a /etc/resolv.conf based on the host's. Since, in
general, we rely on the DNS search path being empty (so that the
resolver uses the local domain), we want to blank the
/etc/resolv.conf by providing --dns-search=. when running a
container.

However, if there's a --dns-search= in the remainder of the args,
Docker will append them to the dot, which breaks resolution. Not good.

So, we only "blank" the search path if there's no --dns-search
argument present already.

In the absence of *either* a `--dns` or `--dns-search` argument,
Docker will write a `/etc/resolv.conf` based on the host's. Since, in
general, we rely on the DNS search path being empty (so that the
resolver uses the local domain), we want to blank the
`/etc/resolv.conf` by providing `--dns-search=.` when running a
container.

However, if there's a `--dns-search=` in the remainder of the args,
Docker will append them to the dot, which breaks resolution. Not good.

So, we only "blank" the search path if there's no `--dns-search`
argument present already.
@rade
Copy link
Member

rade commented Nov 11, 2014

LGTM

squaremo added a commit that referenced this pull request Nov 11, 2014
Supply a --dns-search to blank the inherited resolv.conf search

(fixes #172)
@squaremo squaremo merged commit 418578a into weaveworks:master Nov 11, 2014
@squaremo squaremo self-assigned this Nov 11, 2014
marccarre added a commit that referenced this pull request Jan 6, 2017
If the machine coordinating the test runs does not have jq, then test #175 fails with:
> test #1 "weave_on test-0.lon1.weave-net report | jq -r '.Router.Targets[] | tostring' | sort" failed:
>     expected "test-1.lon1.weave-net
> test-2.lon1.weave-net"
>     got nothing
This change completely removes the dependency on jq to make the test more robust and avoid potential confusion.
marccarre added a commit that referenced this pull request Jan 9, 2017
If the machine coordinating the test runs does not have jq, then test #175 fails with:
> test #1 "weave_on test-0.lon1.weave-net report | jq -r '.Router.Targets[] | tostring' | sort" failed:
>     expected "test-1.lon1.weave-net
> test-2.lon1.weave-net"
>     got nothing
This change completely removes the dependency on jq to make the test more robust and avoid potential confusion.
marccarre added a commit that referenced this pull request Jan 9, 2017
If the machine coordinating the test runs does not have jq, then test #175 fails with:
> test #1 "weave_on test-0.lon1.weave-net report | jq -r '.Router.Targets[] | tostring' | sort" failed:
>     expected "test-1.lon1.weave-net
> test-2.lon1.weave-net"
>     got nothing
This change completely removes the dependency on jq to make the test more robust and avoid potential confusion.
awh added a commit that referenced this pull request Jan 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants