Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch to a different storage driver on an existing docker installation in Redhat Linux 7*

I have under /etc/sysconfig/docker , the following configuration :-

other_args="--insecure-registry ******* -g /apps/var/lib"

Now I am using docker version 17.03.1-ce on Red Hat Enterprise Linux Server release 7.4 and default storage driver as overlay that is causing lot of build issues due to :-

checksum_type: too many links

After doing a bit of research on the internet figured out to get rid of this the best solution would be to use overlay2 driver.

How do i edit the /etc/sysconfig/docker to include storage driver as overlay2. I tried lot of ways but none worked. I don't want to reinstall so looking for the easiest approach here that can allow me switch to overlay2 storage driver. I am sure docker tool is robust enough to allow such modifications on an existing installation.

Any help here would be greatly appreciated as always.

like image 710
Ashley Avatar asked Sep 06 '25 16:09

Ashley


2 Answers

you can edit config file and insert below configuration and please restart docker daemon

{
  "storage-driver": "overlay2"
}
like image 102
Ashok Reddy Avatar answered Sep 08 '25 15:09

Ashok Reddy


Created a file /etc/docker/daemon.json with :-

{
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ]
}

And that did the trick

like image 28
Ashley Avatar answered Sep 08 '25 16:09

Ashley