2.7.3 Configuring a Docker Storage Driver

This section discusses setting up a storage driver for Docker.

To configure a Docker storage driver:

  1. Create or edit /etc/docker/daemon.json.

    If you are creating this file from scratch, it should look like this:

      "storage-driver": "btrfs"

    Replace btrfs with your preferred storage driver. If you are using an XFS, ext3 or ext4 file system, you might replace btrfs with overlay2.

    If this file already exists and contains other entries, be careful that adding a line for the storage-driver configuration variable conforms with typical JSON formatting.

    For more information on the format and options for this configuration file, see:


  2. Check that the --storage-driver option is not being invoked as a command line switch when starting the Docker Engine daemon.

    You should check that this option does not appear in either the /etc/sysconfig/docker or /etc/sysconfig/docker-storage files. These files are deprecated and may be removed in future releases. If these files contain any other configuration parameters, move these into /etc/docker/daemon.json to future-proof your configuration.

    Also check that this option does not appear in any systemd drop-in files in /etc/systemd/system/docker.service.d/. While this is a supported configuration option, it is preferable to keep all Docker Engine configuration consolidated and in the same place, where possible.

  3. When you have started the Docker Engine and it is running, check that it is using the storage driver that you have configured:

    # docker info | grep Storage

    You can run the docker info command on its own to get a more detailed view of the configuration.