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).
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--dns 184.108.40.206 --insecure-registry docker-registry:5000"
# If you need Docker to use an HTTP proxy, it can also be specified here.
# This is also a handy place to tweak where Docker's temporary files go.
# Config proxy
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
Description=Docker Application Container Engine
ExecStart=/usr/bin/docker -d -H fd://
~ $ 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
Main PID: 30354 (docker)
└─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
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 :)
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
Thank you in advance for considering a pull request!
The documentation does not reflect this http://docs.docker.com/engine/installation/ubuntulinux/#configure-a-dns-server-for-use-by-docker
@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