-- Leo's gemini proxy

-- Connecting to republic.circumlunar.space:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Changing the Docker daemon options in systemd on Ubuntu 15.04


Update: now documenting the better way, as described in issue 14513.


Update 2: I think this way is even better (works in Ubuntu 16.04, Docker 1.12.2, Reference: dockerd command line):


sudo -s -H
echo '{"insecure-registries":["myreg.example.com:5000"]}' > /etc/docker/daemon.json
exit
sudo service docker restart

End of update 2


14513

dockerd command line


On earlier versions of Ubuntu (14.04 and before), changing the command line options to the Docker daemon (e.g. to allow using an insecure private registry) was just a matter of editing /etc/default/docker and uncommenting the line starting with #DOCKER_OPTS=.


On Ubuntu 15.04, even though that file still exists, editing it does not have any effect, and I found it quite tricky to work out how to change Docker's command line, so I wrote it up here.


I wanted to use an insecure private docker registry for Docker on Ubuntu 15.04, which uses systemd.


Under systemd, we must create a config file that overrides the default Docker command line by typing sudo systemctl edit docker. In the editor which pops up, type:


[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry=myreg.example.com:5000


Note: the first "ExecStart=" line is necessary.


The second "ExecStart=" line should contain whatever command line options you want to include.


Note: for docker versions before 1.10, replace "daemon" with "-d".


With this config in place, restart the Docker service:


$ sudo systemctl restart docker


Check everything looks right for the Docker service:


$ systemctl status docker


And confirm the command line arguments have been applied with:


$ ps axwww | grep /usr/bin/docker


The instructions here: Control and configure Docker with systemd and issues: 14513 and 15859 suggest that the Docker team are not planning to make this any easier in the short term.


Originally posted at 2015-08-27 10:48:16+00:00. Automatically generated from the original post : apologies for the errors introduced.


Control and configure Docker with systemd

14513

15859

original post

-- Response ended

-- Page fetched on Mon May 27 20:26:27 2024