Docker: pass nameserver at build time?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm using docker with Debian, I know I can pass --dns to a running container, I know I can edit the host's resolv.conf, I know there's a /etc/default/docker that pass DOCKER_OPTS (but doesn't seems to work, I tried service docker restart after but maybe I'm missing something).
But beside editing the host's resolv.conf is there a way to set the nameserver while building an image?
docker
add a comment |Â
up vote
0
down vote
favorite
I'm using docker with Debian, I know I can pass --dns to a running container, I know I can edit the host's resolv.conf, I know there's a /etc/default/docker that pass DOCKER_OPTS (but doesn't seems to work, I tried service docker restart after but maybe I'm missing something).
But beside editing the host's resolv.conf is there a way to set the nameserver while building an image?
docker
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using docker with Debian, I know I can pass --dns to a running container, I know I can edit the host's resolv.conf, I know there's a /etc/default/docker that pass DOCKER_OPTS (but doesn't seems to work, I tried service docker restart after but maybe I'm missing something).
But beside editing the host's resolv.conf is there a way to set the nameserver while building an image?
docker
I'm using docker with Debian, I know I can pass --dns to a running container, I know I can edit the host's resolv.conf, I know there's a /etc/default/docker that pass DOCKER_OPTS (but doesn't seems to work, I tried service docker restart after but maybe I'm missing something).
But beside editing the host's resolv.conf is there a way to set the nameserver while building an image?
docker
docker
asked Sep 19 at 7:40
Alex
1,66011224
1,66011224
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f469952%2fdocker-pass-nameserver-at-build-time%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password