Skip to content

Instantly share code, notes, and snippets.

@brunneis
Last active July 8, 2021 14:05
Show Gist options
  • Save brunneis/000c94de0384c683bfaabb28abc0bb34 to your computer and use it in GitHub Desktop.
Save brunneis/000c94de0384c683bfaabb28abc0bb34 to your computer and use it in GitHub Desktop.
Change storage driver to overlay2 on CentOS
  1. systemctl stop docker
  2. Create the file /etc/docker/daemon.json with the following content:
{
  "storage-driver": "overlay2",
  "storage-opts": ["overlay2.override_kernel_check=true"]
}
  1. systemctl start docker
@Nodraak
Copy link

Nodraak commented Jun 5, 2018

For the record, the flag is --storage-opt, not --storage-opts

Source: https://docs.docker.com/engine/reference/commandline/dockerd/

@andrevtg
Copy link

andrevtg commented Dec 5, 2018

Actually it is "storage-opts" in the /etc/docker/daemon.json file indeed.

@Firefishy
Copy link

Also remember that the backing filesystem of /var/lib/docker/ needs to be ext4 for overlay2. XFS will not work.

@HFSDev
Copy link

HFSDev commented Jul 8, 2021

Also remember that the backing filesystem of /var/lib/docker/ needs to be ext4 for overlay2. XFS will not work.

According to the docs, XFS is supported if filesystem ftype is set to 1.
Check with: $ xfs_info | grep ftype

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment