Skip to content

Commit b140bc1

Browse files
authored
Merge pull request #1212 from BigVan/overlaybd-doc
Add document about overlaybd
2 parents 66a7dd8 + fa392af commit b140bc1

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
[Optional] Supports [rootless mode, without slirp overhead (bypass4netns)](./docs/rootless.md)
1515

16-
[Optional] Supports lazy-pulling ([Stargz](./docs/stargz.md), [Nydus](./docs/nydus.md))
16+
[Optional] Supports lazy-pulling ([Stargz](./docs/stargz.md), [Nydus](./docs/nydus.md), [OverlayBD](./docs/overlaybd.md))
1717

1818
[Optional] Supports [encrypted images (ocicrypt)](./docs/ocicrypt.md)
1919

@@ -145,15 +145,15 @@ docker run -it --rm --privileged nerdctl
145145

146146
The goal of `nerdctl` is to facilitate experimenting the cutting-edge features of containerd that are not present in Docker.
147147

148-
Such features include, but not limited to, on-demand image pulling (lazy-pulling) [Stargz](./docs/stargz.md), [Nydus](./docs/nydus.md) and [image encryption/decryption](./docs/ocicrypt.md).
148+
Such features include, but not limited to, on-demand image pulling (lazy-pulling) [Stargz](./docs/stargz.md), [Nydus](./docs/nydus.md), [OverlayBD](./docs/overlaybd.md) and [image encryption/decryption](./docs/ocicrypt.md).
149149

150150
Note that competing with Docker is _not_ the goal of `nerdctl`. Those cutting-edge features are expected to be eventually available in Docker as well.
151151

152152
Also, `nerdctl` might be potentially useful for debugging Kubernetes clusters, but it is not the primary goal.
153153

154154
## Features present in `nerdctl` but not present in Docker
155155
Major:
156-
- On-demand image pulling (lazy-pulling) using [Stargz](./docs/stargz.md)/[Nydus](./docs/nydus.md) Snapshotter: `nerdctl --snapshotter=stargz|nydus run IMAGE` .
156+
- On-demand image pulling (lazy-pulling) using [Stargz](./docs/stargz.md)/[Nydus](./docs/nydus.md)/[OverlayBD](./docs/overlaybd.md) Snapshotter: `nerdctl --snapshotter=stargz|nydus|overlaybd run IMAGE` .
157157
- [Image encryption and decryption using ocicrypt (imgcrypt)](./docs/ocicrypt.md): `nerdctl image (encrypt|decrypt) SRC DST`
158158
- [P2P image distribution using IPFS](./docs/ipfs.md): `nerdctl run ipfs://CID` .
159159
P2P image distribution (IPFS) is completely optional. Your host is NOT connected to any P2P network, unless you opt in to [install and run IPFS daemon](https://docs.ipfs.io/install/).
@@ -1466,6 +1466,7 @@ Basic features:
14661466
Advanced features:
14671467
- [`./docs/stargz.md`](./docs/stargz.md): Lazy-pulling using Stargz Snapshotter
14681468
- [`./docs/nydus.md`](./docs/nydus.md): Lazy-pulling using Nydus Snapshotter
1469+
- [`./docs/overlaybd.md`](./docs/overlaybd.md): Lazy-pulling using OverlayBD Snapshotter
14691470
- [`./docs/ocicrypt.md`](./docs/ocicrypt.md): Running encrypted images
14701471
- [`./docs/gpu.md`](./docs/gpu.md): Using GPUs inside containers
14711472
- [`./docs/multi-platform.md`](./docs/multi-platform.md): Multi-platform mode

docs/overlaybd.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Lazy-pulling using OverlayBD Snapshotter
2+
3+
| :zap: Requirement | nerdctl >= 0.15.0 |
4+
| ----------------- | --------------- |
5+
6+
OverlayBD is a remote container image format base on block-device which is an open-source implementation of paper ["DADI: Block-Level Image Service for Agile and Elastic Application Deployment. USENIX ATC'20".](https://www.usenix.org/conference/atc20/presentation/li-huiba)
7+
8+
See https://github.com/containerd/accelerated-container-image to learn further information.
9+
10+
## Enable lazy-pulling for `nerdctl run`
11+
12+
- Install containerd remote snapshotter plugin (`overlaybd`) from https://github.com/containerd/accelerated-container-image/blob/main/docs/BUILDING.md
13+
14+
- Add the following to `/etc/containerd/config.toml`:
15+
```toml
16+
[proxy_plugins]
17+
[proxy_plugins.overlaybd]
18+
type = "snapshot"
19+
address = "/run/overlaybd-snapshotter/overlaybd.sock"
20+
```
21+
22+
- Launch `containerd` and `overlaybd-snapshotter`
23+
24+
- Run `nerdctl` with `--snapshotter=overlaybd`
25+
```console
26+
nerdctl run --net host -it --rm --snapshotter=overlaybd registry.hub.docker.com/overlaybd/redis:6.2.1_obd
27+
```
28+
29+
For more details about how to build overlaybd image, please refer to [accelerated-container-image](https://github.com/containerd/accelerated-container-image/blob/main/docs/IMAGE_CONVERTOR.md) conversion tool.

0 commit comments

Comments
 (0)