Home Explore Blog Models CI



docker

1st chunk of `content/manuals/engine/storage/drivers/select-storage-driver.md`
6a0025fb792299d7c870bbd9fc5f53090390fd484981c44e0000000100000fa4
---
title: Select a storage driver
weight: 10
description: Learn how to select the proper storage driver for your container.
keywords: container, storage, driver, btrfs, zfs, overlay, overlay2
aliases:
  - /storage/storagedriver/selectadriver/
  - /storage/storagedriver/select-storage-driver/
---

Ideally, very little data is written to a container's writable layer, and you
use Docker volumes to write data. However, some workloads require you to be able
to write to the container's writable layer. This is where storage drivers come
in.

Docker supports several storage drivers, using a pluggable architecture. The
storage driver controls how images and containers are stored and managed on your
Docker host. After you have read the [storage driver overview](./_index.md), the
next step is to choose the best storage driver for your workloads. Use the storage
driver with the best overall performance and stability in the most usual scenarios.

> [!NOTE]
> This page discusses storage drivers for Docker Engine on Linux. If you're
> running the Docker daemon with Windows as the host OS, the only supported
> storage driver is windowsfilter. For more information, see
> [windowsfilter](windowsfilter-driver.md).

The Docker Engine provides the following storage drivers on Linux:

| Driver            | Description                                                                                                                                                                                                                                                                                                                                          |
| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `overlay2`        | `overlay2` is the preferred storage driver for all currently supported Linux distributions, and requires no extra configuration.                                                                                                                                                                                                                     |
| `fuse-overlayfs`  | `fuse-overlayfs`is preferred only for running Rootless Docker on an old host that does not provide support for rootless `overlay2`. The `fuse-overlayfs` driver does not need to be used since Linux kernel 5.11, and `overlay2` works even in rootless mode. Refer to the [rootless mode documentation](/manuals/engine/security/rootless.md) for details. |
| `btrfs` and `zfs` | The `btrfs` and `zfs` storage drivers allow for advanced options, such as creating "snapshots", but require more maintenance and setup. Each of these relies on the backing filesystem being configured correctly.                                                                                                                                   |
| `vfs`             | The `vfs` storage driver is intended for testing purposes, and for situations where no copy-on-write filesystem can be used. Performance of this storage driver is poor, and is not generally recommended for production use.                                                                                                                        |

<!-- markdownlint-disable reference-links-images -->

The Docker Engine has a prioritized list of which storage driver to use if no
storage driver is explicitly configured, assuming that the storage driver meets
the prerequisites, and automatically selects a compatible storage driver. You
can see the order in the [source code for Docker Engine {{% param "docker_ce_version" %}}](https://github.com/moby/moby/blob/v{{% param "docker_ce_version" %}}/daemon/graphdriver/driver_linux.go#L52-L53).
{ #storage-driver-order }

Title: Selecting a Storage Driver for Docker
Summary
This document guides users on selecting the appropriate storage driver for their Docker containers on Linux. It highlights that while Docker volumes are preferred for data persistence, storage drivers manage how images and containers are stored and managed when writing to the container's writable layer is necessary. The document lists available storage drivers such as `overlay2` (the preferred option), `fuse-overlayfs` (mainly for rootless Docker), `btrfs` and `zfs` (for advanced options like snapshots), and `vfs` (for testing purposes only). It also mentions that Docker Engine automatically selects a compatible driver based on a prioritized list.