Skip to content

Commit d4bb237

Browse files
committed
wip: content
1 parent bf628be commit d4bb237

File tree

5 files changed

+92
-33
lines changed

5 files changed

+92
-33
lines changed

content/manuals/admin/company/owners.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ entire company and can manage settings that apply to all organizations under
1313
that company. They also have the same access rights as organization owners but
1414
don’t need to be members of any individual organization.
1515

16+
1617
> [!IMPORTANT]
1718
>
1819
> Company owners do not occupy a seat unless one of the following is true:

content/manuals/engine/storage/_index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ container if another process needs it.
1818
The writable layer is unique per container. You can't easily extract the data
1919
from the writeable layer to the host, or to another container.
2020

21+
> [!IMPORTANT]
22+
> Starting with Docker Engine v29, Docker uses
23+
> [containerd](./containerd.md) for managing container storage and images.
24+
25+
## Image storage
26+
27+
Docker offers two implementation of image storage:
28+
29+
- Default/current implementation: [Containerd](./containerd.md)
30+
- Legacy/deprecated implementation: [Storage drivers](./drivers/_index.md)
31+
2132
## Storage mount options
2233

2334
Docker supports the following types of storage mounts for storing data outside

content/manuals/engine/storage/containerd.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,69 @@ aliases:
88
- /storage/containerd/
99
---
1010

11-
{{< summary-bar feature_name="containerd" >}}
11+
Starting with Docker Engine v29, Docker uses [`containerd`](https://containerd.io/)
12+
for managing container storage and images. `containerd` is the industry-standard container runtime.
1213

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.
14+
## Main benefits
1715

18-
To learn more about the containerd image store and its benefits, refer to
16+
containerd offers the following benefits:
17+
18+
- Shared maintenance: containerd is an open-source project maintained by a large community.
19+
- Customizability: use [snapshotters](snapshotters.md)
20+
with unique characteristics, such as:
21+
- [stargz](https://github.com/containerd/stargz-snapshotter) for lazy-pulling images on container
22+
startup.
23+
- [nydus](https://github.com/containerd/nydus-snapshotter) or [dragonfly](https://github.com/dragonflyoss/nydus) for peer-to-peer image distribution.
24+
- Portability: containerd is lighter and more modular.
25+
- Multi-platform support: Build multi-platform images and images with attestations.
26+
- WebAssembly: Ability to run Wasm containers.
27+
28+
For more information about the containerd image store and its benefits, refer to
1929
[containerd image store on Docker Desktop](/manuals/desktop/features/containerd.md).
2030

21-
## Enable containerd image store on Docker Engine
31+
## Migrate to containerd image store on Docker Engine
32+
33+
When you update to Docker Engine v29 and enable the containrd feature, you are automatically migrated.
34+
This is a non-breaking migration with support for backward compatibility.
2235

2336
Switching to containerd snapshotters causes you to temporarily lose images and
2437
containers created using the classic storage drivers.
2538
Those resources still exist on your filesystem, and you can retrieve them by
2639
turning off the containerd snapshotters feature.
2740

28-
The following steps explain how to enable the containerd snapshotters feature.
41+
Docker Engine uses the `overlayfs` containerd snapshotter by default.
42+
43+
To display which driver you are using, run:
44+
45+
```console
46+
$ docker info -f '{{ .DriverStatus }}'
47+
```
48+
49+
## Disabling containerd image store
50+
51+
The following steps explain how to disable the containerd snapshotters feature.
2952

3053
1. Add the following configuration to your `/etc/docker/daemon.json`
3154
configuration file:
3255

3356
```json
3457
{
3558
"features": {
36-
"containerd-snapshotter": true
59+
"containerd-snapshotter": false
3760
}
3861
}
3962
```
4063

4164
2. Save the file.
65+
4266
3. Restart the daemon for the changes to take effect.
4367

4468
```console
4569
$ sudo systemctl restart docker
4670
```
4771

48-
After restarting the daemon, running `docker info` shows that you're using
49-
containerd snapshotter storage drivers.
72+
4. Verify which driver you are using:
5073

51-
```console
52-
$ docker info -f '{{ .DriverStatus }}'
53-
[[driver-type io.containerd.snapshotter.v1]]
54-
```
55-
56-
Docker Engine uses the `overlayfs` containerd snapshotter by default.
74+
```console
75+
$ docker info -f '{{ .DriverStatus }}'
76+
```

content/manuals/engine/storage/drivers/_index.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
description: Learn the technologies that support storage drivers.
33
keywords: container, storage, driver, btrfs, overlayfs, vfs, zfs
44
title: Storage drivers
5-
weight: 40
65
aliases:
76
- /storage/storagedriver/imagesandcontainers/
87
- /storage/storagedriver/
98
- /engine/userguide/storagedriver/imagesandcontainers/
109
---
1110

11+
{{< summary-bar feature_name="StorageDrivers"
12+
text="Use [containerd](../containerd.md) instead.">}}
13+
1214
To use storage drivers effectively, it's important to know how Docker builds and
1315
stores images, and how these images are used by containers. You can use this
1416
information to make informed choices about the best way to persist data from
@@ -170,7 +172,7 @@ docker.io/library/ubuntu:22.04
170172

171173
Each of these layers is stored in its own directory inside the Docker host's
172174
local storage area. To examine the layers on the filesystem, list the contents
173-
of `/var/lib/docker/<storage-driver>`. This example uses the `overlay2`
175+
of `/var/lib/docker/<storage-driver>`. This example uses the `overlay2`
174176
storage driver:
175177

176178
```console
@@ -326,7 +328,7 @@ layers are the same.
326328
Before BuildKit, the "classic" builder would produce a new "intermediate"
327329
image for each step for caching purposes, and the `IMAGE` column would show
328330
the ID of that image.
329-
331+
330332
BuildKit uses its own caching mechanism, and no longer requires intermediate
331333
images for caching. Refer to [BuildKit](/manuals/build/buildkit/_index.md)
332334
to learn more about other enhancements made in BuildKit.
@@ -343,7 +345,7 @@ layers are the same.
343345
"sha256:07b4a9068b6af337e8b8f1f1dae3dd14185b2c0003a9a1f0a6fd2587495b204a"
344346
]
345347
```
346-
348+
347349
```console
348350
$ docker image inspect --format "{{json .RootFS.Layers}}" acme/my-final-image:1.0
349351
[
@@ -363,7 +365,7 @@ layers are the same.
363365
> [!TIP]
364366
>
365367
> Format output of Docker commands with the `--format` option.
366-
>
368+
>
367369
> The examples above use the `docker image inspect` command with the `--format`
368370
> option to view the layer IDs, formatted as a JSON array. The `--format`
369371
> option on Docker commands can be a powerful feature that allows you to
@@ -412,7 +414,7 @@ in a `copy_up` operation, therefore duplicating the file to the writable layer.
412414
> applications, for example write-intensive databases, are known to be
413415
> problematic particularly when pre-existing data exists in the read-only
414416
> layer.
415-
>
417+
>
416418
> Instead, use Docker volumes, which are independent of the running container,
417419
> and designed to be efficient for I/O. In addition, volumes can be shared
418420
> among containers and don't increase the size of your container's writable
@@ -449,7 +451,7 @@ examines how much room they take up.
449451
2. Run the `docker ps` command with the `--size` option to verify the 5 containers
450452
are running, and to see each container's size.
451453

452-
454+
453455
```console
454456
$ docker ps --size --format "table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Size}}"
455457

@@ -460,35 +462,35 @@ examines how much room they take up.
460462
a5ff32e2b551 acme/my-final-image:1.0 my_container_2 0B (virtual 7.75MB)
461463
40ebdd763416 acme/my-final-image:1.0 my_container_1 0B (virtual 7.75MB)
462464
```
463-
465+
464466
The output above shows that all containers share the image's read-only layers
465467
(7.75MB), but no data was written to the container's filesystem, so no additional
466468
storage is used for the containers.
467469

468470
{{< accordion title="Advanced: metadata and logs storage used for containers" >}}
469-
471+
470472
> [!NOTE]
471473
>
472474
> This step requires a Linux machine, and doesn't work on Docker Desktop, as
473475
> it requires access to the Docker Daemon's file storage.
474-
476+
475477
While the output of `docker ps` provides you information about disk space
476478
consumed by a container's writable layer, it doesn't include information
477479
about metadata and log-files stored for each container.
478-
480+
479481
More details can be obtained by exploring the Docker Daemon's storage
480482
location (`/var/lib/docker` by default).
481-
483+
482484
```console
483485
$ sudo du -sh /var/lib/docker/containers/*
484-
486+
485487
36K /var/lib/docker/containers/3ed3c1a10430e09f253704116965b01ca920202d52f3bf381fbb833b8ae356bc
486488
36K /var/lib/docker/containers/40ebdd7634162eb42bdb1ba76a395095527e9c0aa40348e6c325bd0aa289423c
487489
36K /var/lib/docker/containers/939b3bf9e7ece24bcffec57d974c939da2bdcc6a5077b5459c897c1e2fa37a39
488490
36K /var/lib/docker/containers/a5ff32e2b551168b9498870faf16c9cd0af820edf8a5c157f7b80da59d01a107
489491
36K /var/lib/docker/containers/cddae31c314fbab3f7eabeb9b26733838187abc9a2ed53f97bd5b04cd7984a5a
490492
```
491-
493+
492494
Each of these containers only takes up 36k of space on the filesystem.
493495

494496
{{< /accordion >}}
@@ -502,13 +504,13 @@ examines how much room they take up.
502504
```console
503505
$ for i in {1..3}; do docker exec my_container_$i sh -c 'printf hello > /out.txt'; done
504506
```
505-
507+
506508
Running the `docker ps` command again afterward shows that those containers
507509
now consume 5 bytes each. This data is unique to each container, and not
508510
shared. The read-only layers of the containers aren't affected, and are still
509511
shared by all containers.
510512

511-
513+
512514
```console
513515
$ docker ps --size --format "table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Size}}"
514516

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: containerd snapshotters
3+
description: Learn how to use containerd snapshotters in Docker Engine.
4+
keywords: containerd, snapshotters, storage, overlayfs, fuse, docker, engine, filesystem, performance
5+
---
6+
7+
containerd snapshotters are components responsible for managing the filesystem
8+
layers of containers. They provide the mechanism for storing, mounting, and
9+
manipulating container filesystems using different backends such as overlayfs or
10+
fuse.
11+
12+
By abstracting the storage implementation, snapshotters allow Docker Engine to
13+
efficiently manage container images and their writable layers, enabling features
14+
like fast image pulls, efficient storage usage, and support for advanced
15+
filesystems.
16+
17+
For more information, see
18+
the [containerd repository](https://github.com/containerd/containerd/tree/main/docs/snapshotters).
19+
20+
| Snapshotter | Description |
21+
|-----------------------|----------------------------------------------------------------------------------------|
22+
| `overlayfs` (default) | OverlayFS. The containerd implementation of the Docker/Moby `overlay2` storage driver. |
23+
| `native` | Native file copying driver. Akin to Docker/Moby's "vfs" driver. |
24+
25+

0 commit comments

Comments
 (0)