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

/etc/default/docker seems to be ignored...!? #12926

Closed
AubreyHewes opened this Issue May 1, 2015 · 9 comments

Comments

Projects
None yet
7 participants
@AubreyHewes

AubreyHewes commented May 1, 2015

I have a /etc/default/docker file which specifies my router ip as dns option.. this always used to work but now no longer does... it seems the file is now ignored?!? .. (recent changes.. updated to ubuntu 15.04 et al).

When running a basic debian image the /etc/resolv.conf does not contain the configured ip...

Ubuntu version
$ lsb_release -drc
Description:    Ubuntu 15.04
Release:    15.04
Codename:   vivid
Docker version
$ docker -v
Docker version 1.6.0, build 4749651
Defaults
$ cat /etc/default/docker | grep DOCKER_OPTS
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
DOCKER_OPTS="--dns 192.168.0.1 --dns 8.8.8.8 --dns 8.8.4.4"
Service not using defaults

Following should have specified dns 192.168.0.1?

$ docker run -it debian /bin/cat /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search router


nameserver 8.8.8.8
nameserver 8.8.4.4
Following ping only works intermittently..
$ docker run -it debian /bin/ping -c1 security.debian.org
/bin/ping: unknown host

Dumb solution

Adding the router IP to /etc/resolvconf/resolv.conf.d/tail and restarting networking and docker makes it all work again...

$ docker run -i -t debian /bin/cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search router
nameserver 192.168.0.1

Though this can surely not be the solution?

Thanks.

@AubreyHewes

This comment has been minimized.

Show comment
Hide comment
@AubreyHewes

AubreyHewes May 1, 2015

Additional info

$ uname -a
Linux alita 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 4749651
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 4749651
OS/Arch (server): linux/amd64

$ docker -D info
Containers: 205
Images: 372
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 786
 Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 3.19.0-15-generic
Operating System: Ubuntu 15.04
CPUs: 8
Total Memory: 15.57 GiB
Name: alita
ID: AFED:LUXR:3RMO:U4UH:NVKY:MMOX:CMUK:S6CO:VDXZ:CHVT:MYHY:DURW
Debug mode (server): false
Debug mode (client): true
Fds: 11
Goroutines: 19
System Time: Fri May  1 21:42:36 CEST 2015
EventsListeners: 0
Init SHA1: 9145575052383dbf64cede3bac278606472e027c
Init Path: /usr/bin/docker
Docker Root Dir: /var/lib/docker
Username: XXX
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support

AubreyHewes commented May 1, 2015

Additional info

$ uname -a
Linux alita 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 4749651
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 4749651
OS/Arch (server): linux/amd64

$ docker -D info
Containers: 205
Images: 372
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 786
 Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 3.19.0-15-generic
Operating System: Ubuntu 15.04
CPUs: 8
Total Memory: 15.57 GiB
Name: alita
ID: AFED:LUXR:3RMO:U4UH:NVKY:MMOX:CMUK:S6CO:VDXZ:CHVT:MYHY:DURW
Debug mode (server): false
Debug mode (client): true
Fds: 11
Goroutines: 19
System Time: Fri May  1 21:42:36 CEST 2015
EventsListeners: 0
Init SHA1: 9145575052383dbf64cede3bac278606472e027c
Init Path: /usr/bin/docker
Docker Root Dir: /var/lib/docker
Username: XXX
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support
@jessfraz

This comment has been minimized.

Show comment
Hide comment
@jessfraz

jessfraz May 1, 2015

Contributor

15.04 uses systemd it's not compatible w that file

On Friday, May 1, 2015, Aubrey Hewes notifications@github.com wrote:

Additional info

$ uname -a
Linux alita 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 4749651
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 4749651
OS/Arch (server): linux/amd64

$ docker -D info
Containers: 205
Images: 372
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 786
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 3.19.0-15-generic
Operating System: Ubuntu 15.04
CPUs: 8
Total Memory: 15.57 GiB
Name: alita
ID: AFED:LUXR:3RMO:U4UH:NVKY:MMOX:CMUK:S6CO:VDXZ:CHVT:MYHY:DURW
Debug mode (server): false
Debug mode (client): true
Fds: 11
Goroutines: 19
System Time: Fri May 1 21:42:36 CEST 2015
EventsListeners: 0
Init SHA1: 9145575052383dbf64cede3bac278606472e027c
Init Path: /usr/bin/docker
Docker Root Dir: /var/lib/docker
Username: XXX
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support


Reply to this email directly or view it on GitHub
#12926 (comment).

Contributor

jessfraz commented May 1, 2015

15.04 uses systemd it's not compatible w that file

On Friday, May 1, 2015, Aubrey Hewes notifications@github.com wrote:

Additional info

$ uname -a
Linux alita 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 4749651
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 4749651
OS/Arch (server): linux/amd64

$ docker -D info
Containers: 205
Images: 372
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 786
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 3.19.0-15-generic
Operating System: Ubuntu 15.04
CPUs: 8
Total Memory: 15.57 GiB
Name: alita
ID: AFED:LUXR:3RMO:U4UH:NVKY:MMOX:CMUK:S6CO:VDXZ:CHVT:MYHY:DURW
Debug mode (server): false
Debug mode (client): true
Fds: 11
Goroutines: 19
System Time: Fri May 1 21:42:36 CEST 2015
EventsListeners: 0
Init SHA1: 9145575052383dbf64cede3bac278606472e027c
Init Path: /usr/bin/docker
Docker Root Dir: /var/lib/docker
Username: XXX
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support


Reply to this email directly or view it on GitHub
#12926 (comment).

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon May 1, 2015

Member

# Docker Upstart and SysVinit configuration file

This is the relevant bit of info. In 15.04/Vivid, systemd has replaced Upstart as the default init system, so modifications to the way Docker starts up should now be done in a systemd drop-in file in /etc/systemd instead.

Member

tianon commented May 1, 2015

# Docker Upstart and SysVinit configuration file

This is the relevant bit of info. In 15.04/Vivid, systemd has replaced Upstart as the default init system, so modifications to the way Docker starts up should now be done in a systemd drop-in file in /etc/systemd instead.

@jessfraz

This comment has been minimized.

Show comment
Hide comment
@jessfraz

jessfraz May 1, 2015

Contributor

There were multiple issues already opened about this its systemd, you need to define in systemd terms

Contributor

jessfraz commented May 1, 2015

There were multiple issues already opened about this its systemd, you need to define in systemd terms

@jessfraz jessfraz closed this May 1, 2015

@AubreyHewes

This comment has been minimized.

Show comment
Hide comment
@AubreyHewes

AubreyHewes May 1, 2015

Thanks for the pointer. Should have probably worked this out myself but anyway. Sorry, could not find any issues that matched.
Maybe the documentation for installing/configuration on vivid needs to be updated/included for this issue (i.e. #3630) ? Or the installer.. anyway thanks!

AubreyHewes commented May 1, 2015

Thanks for the pointer. Should have probably worked this out myself but anyway. Sorry, could not find any issues that matched.
Maybe the documentation for installing/configuration on vivid needs to be updated/included for this issue (i.e. #3630) ? Or the installer.. anyway thanks!

@serverangels

This comment has been minimized.

Show comment
Hide comment
@serverangels

serverangels Sep 4, 2015

This definitely needs fixing in the documentation - the docs here:

https://docs.docker.com/articles/networking/#bridge-building

... do not reference this.

Thanks to the OP for posting this report - i've been going mad for the last hour trying to find the cause of my problem...

serverangels commented Sep 4, 2015

This definitely needs fixing in the documentation - the docs here:

https://docs.docker.com/articles/networking/#bridge-building

... do not reference this.

Thanks to the OP for posting this report - i've been going mad for the last hour trying to find the cause of my problem...

@arthurlogilab

This comment has been minimized.

Show comment
Hide comment
@ivan4th

This comment has been minimized.

Show comment
Hide comment
@ivan4th

ivan4th Dec 15, 2015

+1 docs need to be fixed! As of now, the recipe documented at http://docs.docker.com/engine/installation/ubuntulinux/#configure-a-dns-server-for-use-by-docker doesn't work with systemd and there's no mention of systemd-specific config specs there.

ivan4th commented Dec 15, 2015

+1 docs need to be fixed! As of now, the recipe documented at http://docs.docker.com/engine/installation/ubuntulinux/#configure-a-dns-server-for-use-by-docker doesn't work with systemd and there's no mention of systemd-specific config specs there.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Dec 15, 2015

Member

Documentation is fixed in #18367, but not yet published on the website. Note that the Markdown source files for the documentation are part of this repository, feel free to open a pull request if you spot inconsistencies, or think improvements can be made.

Member

thaJeztah commented Dec 15, 2015

Documentation is fixed in #18367, but not yet published on the website. Note that the Markdown source files for the documentation are part of this repository, feel free to open a pull request if you spot inconsistencies, or think improvements can be made.

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