Docker Community Forums

Share and learn in the Docker community.

Default directory change fails - systemd seems to ignore docker.service modification


(Dimitrios Lykissas) #1

TL;DR; I want the PULL-ed images and the containers on a separate partition but Docker does not respond to configuration.

I have changed the ‘docker.service’ file as per the instructions on ‘https://docs.docker.com/articles/systemd/’. In my ‘docker.service’ I have added ‘EnvironmentFile=-/srv/docker/docker.conf’ under the ‘[Service]’ section. In the ‘/srv/docker/docker.conf’ file I have ‘OPTIONS="–graph /srv/docker --storage btrfs’. In spite of these configuration changes, when I PULL an image it is not stored inside the ‘/srv/docker’ directory. Any ideas why is this?


(Sven Dowideit) #2

one thing I always forget to do, is to tell systemd that I changed something - ie run systemctl daemon-reload and then restart the Dockerdaemon.