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

Docker does not use config file on Ubuntu 15.04 #13384

Closed
aanc opened this Issue May 21, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@aanc

aanc commented May 21, 2015

Hello,

I'm using Docker version 1.6.2, build 7c8fca2. I installed it when I was running Ubuntu 14.10, and after I upgraded to Ubuntu 15.04, Docker does not use the configuration options specified in /etc/default/docker anymore, so the DOCKER_OPTS and proxy config are not loaded.

Here is my /etc/default/docker file :

# Docker Upstart and SysVinit configuration file

# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"

# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--dns 1.2.3.4 --insecure-registry docker-registry:5000"

# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"

# Config proxy
export http_proxy='http://myusername:mypassword@proxy:3128'
export https_proxy='http://myusername:mypassword@proxy:3128'
export no_proxy="127.0.0.1,docker-registry"

Docker process does not have the requested options:

~ $ ps -ef | grep docker
root     30354     1  0 18:07 ?        00:00:00 /usr/bin/docker -d -H fd:// 

As Ubuntu 15.04 is now using systemd, it seems /lib/systemd/system/docker.service is now used instead of the upstart script or the init.d script:

~ $ cat /lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
Requires=docker.socket

[Service]
ExecStart=/usr/bin/docker -d -H fd://
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity

[Install]
WantedBy=multi-user.target

~ $ systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since jeu. 2015-05-21 18:07:33 CEST; 8min ago
     Docs: http://docs.docker.com
 Main PID: 30354 (docker)
   CGroup: /system.slice/docker.service
           └─30354 /usr/bin/docker -d -H fd://

As a workarround I could add the needed options to the ExecStart= line, but I feel it's not how things are supposed to work, and I do not know how I could set the proxy infos here.

Thanks in advance for your help

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah May 21, 2015

Member

This is because 15.04 no longer uses Upstart, and switched to using systemd as you found out. The /etc/default/docker file is only used for upstart and SysVinit (see the comment at the top of that file). You can find some additional information in #12926 (comment)

I'm going to close this issue because it's a duplicate of #12926. Also there's an open issue #3630 for improving the documentation around this.

We do welcome pull requests for that if you are interested :)

Member

thaJeztah commented May 21, 2015

This is because 15.04 no longer uses Upstart, and switched to using systemd as you found out. The /etc/default/docker file is only used for upstart and SysVinit (see the comment at the top of that file). You can find some additional information in #12926 (comment)

I'm going to close this issue because it's a duplicate of #12926. Also there's an open issue #3630 for improving the documentation around this.

We do welcome pull requests for that if you are interested :)

@thaJeztah thaJeztah closed this May 21, 2015

@aanc

This comment has been minimized.

Show comment
Hide comment
@aanc

aanc May 22, 2015

I looked at it and I think maybe I'll be able to submit something, if I can find an elegant way to do it. Hopefully I'll be able to submit a pull request soon.

Thanks for your help

aanc commented May 22, 2015

I looked at it and I think maybe I'll be able to submit something, if I can find an elegant way to do it. Hopefully I'll be able to submit a pull request soon.

Thanks for your help

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah May 22, 2015

Member

Thank you in advance for considering a pull request!

Member

thaJeztah commented May 22, 2015

Thank you in advance for considering a pull request!

@arthurlogilab

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Nov 13, 2015

Member

@arthurlogilab yup, there are some parts in the documentation that must be updated to show both SystemD and upstart examples. There is an open issue for this, don't have the issue number at hand though

Member

thaJeztah commented Nov 13, 2015

@arthurlogilab yup, there are some parts in the documentation that must be updated to show both SystemD and upstart examples. There is an open issue for this, don't have the issue number at hand though

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