containerd image store

The containerd image store integrates MCR with the containerd content store and snapshotters rather than with the legacy graph driver stack for image layers. The legacy stack remains available on supported platforms; refer to Storage driver compatibility.

It is not necessary to edit the daemon.json file to get the supported default. If features.containerd-snapshotter is absent, MCR picks the image store, depending on how the deployment was introduced. In the case of a new installation the dameon uses the containerd image store, whereas if the instance is an upgrade from an earlier deployment the daemon continues with the legacy image store sto ensure that the existing images and behavior remain consistent.

You should only set features.containerd-snapshotter in the daemon.json file when you want it to differ from the defaults. Typically, this is used to persist the legacy graph drivers on a new install, or to move an upgraded host to the containerd image store. Refer to Configuration for values and an example.

Benefits

The containerd image store:

  • Provides native support for multi-platform images and WebAssembly (Wasm) workloads, and pluggable snapshotters for such features as lazy pulling and performance-oriented optimizations.

  • Retains both compressed and uncompressed image layers, and thus disk usage is typically higher than it is with legacy drivers. Be sure to review space before you enable conatainerd image store or when sizing nodes.

For most workloads, the changes brought on by containerd image store are operationally transparent, aside from footprint and the migration notes detailed herein.

Configuration

Add features.containerd-snapshotter under /etc/docker/daemon.json whenever you need an explicit option other than the previously detailed defaults:

Value

Effect

true

Use the containerd image store (snapshotters).

false

Opt out of the containerd image store on a new installation and use legacy graph drivers for the image store.

Example: For opting in on a host that was upgraded from the legacy store:

{
  "features": {
    "containerd-snapshotter": true
  }
}

Note

Restart the Docker daemon after editing the daemon.json file.

Switching backends

When you change image storage backends, only the mages that are recorded in the inactive backend stay on disk; however, these images are not available to the daemon. To move workloads across the switch, either push the images to a registry or export the containers and images before you change configuration. Then pull or import after the switch.

See also