|
| 1 | +--- |
| 2 | +title: containerd image store with Docker Engine |
| 3 | +keywords: containerd, snapshotters, image store, docker engine |
| 4 | +description: Enabling the containerd image store on Docker Engine |
| 5 | +--- |
| 6 | + |
| 7 | +> **Note** |
| 8 | +> |
| 9 | +> The containerd image store is an experimental feature of Docker Engine. |
| 10 | +> If you're using Docker Desktop, don't use the instructions on this page. See |
| 11 | +> [containerd image store with Docker Desktop](../desktop/containerd/index.md). |
| 12 | +
|
| 13 | +containerd, the industry-standard container runtime, uses snapshotters instead |
| 14 | +of the classic storage drivers for storing image and container data. |
| 15 | +While the `overlay2` driver still remains the default driver for Docker Engine, |
| 16 | +you can opt in to using containerd snapshotters as an experimental feature. |
| 17 | + |
| 18 | +To learn more about the containerd image store and its benefits, refer to |
| 19 | +[containerd image store on Docker Desktop](../desktop/containerd/index.md). |
| 20 | + |
| 21 | +## Enable containerd image store on Docker Engine |
| 22 | + |
| 23 | +Switching to containerd snapshotters causes you to temporarily lose images and |
| 24 | +containers created using the classic storage drivers. |
| 25 | +Those resources still exist on your filesystem, and you can retrieve them by |
| 26 | +turning off the containerd snapshotters feature. |
| 27 | + |
| 28 | +The following steps explain how to enable the containerd snapshotters feature. |
| 29 | + |
| 30 | +1. Add the following configuration to your `/etc/docker/daemon.json` |
| 31 | + configuration file: |
| 32 | + |
| 33 | + ```json |
| 34 | + { |
| 35 | + "features": { |
| 36 | + "containerd-snapshotter": true |
| 37 | + } |
| 38 | + } |
| 39 | + ``` |
| 40 | + |
| 41 | +2. Save the file. |
| 42 | +3. Restart the daemon for the changes to take effect. |
| 43 | + |
| 44 | + ```console |
| 45 | + $ sudo systemctl restart docker |
| 46 | + ``` |
| 47 | + |
| 48 | +After restarting the daemon, running `docker info` shows that you're using |
| 49 | +containerd snapshotter storage drivers. |
| 50 | + |
| 51 | +{% raw %} |
| 52 | +```console |
| 53 | +$ docker info -f '{{ .DriverStatus }}' |
| 54 | +[[driver-type io.containerd.snapshotter.v1]] |
| 55 | +``` |
| 56 | +{% endraw %} |
| 57 | + |
| 58 | +Docker Engine uses the `overlayfs` containerd snapshotter by default. |
0 commit comments