Change default Docker location


By default, Docker will store its data in /var/lib/docker. Sometimes it’s needed to change this location. There are several ways to do it. The easiest is to create the following file:

/etc/systemd/system/docker.service.d/docker-storage.conf

[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --graph="/home/docker"

Then you just need to refresh systemctl, make sure your folder exists and restart docker:

mkdir -p /home/docker
systemctl daemon-reload
systemctl stop docker
systemctl start docker

No restart needed.