You are not logged in.
Hello,
I'm new to docker, and i would like to know the recommended way to configure it with arch distro.
To explain, i read the wiki about docker and some other articles on some blogs, and :
- the wiki shows how to send parameters to docker server at startup, configuring a .conf file saved in path /etc/systemd/system/docker.service.d/
See : https://wiki.archlinux.org/index.php/Do … .x_and_LXC
- others discussions/docs says to put options to pass to docker server in the DOCKER_OPTS variable set in the file /etc/default/docker
Which way do i have to take ?
Many thanks
Rone.
Last edited by Rone (2015-05-08 14:44:42)
Offline
For Arch the first method is the correct way (systemd sevice override file).
Scott
Yes, your answer confirm what i have tested.
I have created a named my_docker_options.conf configuration file, that i use to set the DNS search domain (--dns) and Root of the docker runtime (-g).
$ sudo mkdir -p /etc/systemd/system/docker.service.d
$ sudo touch /etc/systemd/system/docker.service.d/my_docker_options.conf
$ sudo vi /etc/systemd/system/docker.service.d/my_docker_options.conf
And with /etc/systemd/system/docker.service.d/my_docker_options.conf containing my options for docker service startup :
[Service]
ExecStart=
ExecStart=/usr/bin/docker -d -g /srv/docker2 --dns=8.8.8.8
Then reloaded and restarted docker.service :
$ sudo systemctl daemon-reload && sudo systemctl restart docker.service
And i could verify that options set for docker daemon had actually been taken into account :
$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker_settings.conf
Active: active (running) since Fri 2015-05-08 12:21:13 RET; 6h ago
Docs: http://docs.docker.com
Main PID: 1955 (docker)
Memory: 10.1M
CGroup: /system.slice/docker.service
└─1955 /usr/bin/docker -d -g /srv/docker2 --dns=8.8.8.8
Last edited by Rone (2015-05-09 10:12:51)
Offline
For Arch the first method is the correct way (systemd sevice override file).
Scott
Didn't known about systemd sevice override file ; suppose that the wiki explains it relatively to systemd article.
Offline
See also this thread : https://bbs.archlinux.org/viewtopic.php?id=190391. Sorry, i didn't seen it before posting.
Many thanks @firecat53.
Last edited by Rone (2015-05-08 15:08:48)
Offline