-
Notifications
You must be signed in to change notification settings - Fork 0
Docker change root dir
Alejandro Blanco Muñoz edited this page Jul 29, 2020
·
1 revision
To change the /var/lib/docker default root directory to another location with more space.
In this case we are going to change the root dir from /var/lib/docker
to /home/docker
First stop Docker daemon:
systemctl stop docker
Open and edit the file /etc/sysconfig/docker
:
Modify the OPTIONS variable:
Original:
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'
Modified:
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --graph=/home/docker --storage-driver=overlay2'
Start Docker:
systemctl start docker
And now the root dir should be /home/docker
. It can be checked with the docker info
command.