Skip to content

Commit 94efd68

Browse files
committed
Update EXAMPLE.md
Signed-off-by: Yifan Yuan <tuji.yyf@alibaba-inc.com>
1 parent 615b5f3 commit 94efd68

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

docs/EXAMPLES.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,10 @@ If there is no overlaybd plugin, please checkout [BUILDING](BUILDING.md).
3636

3737
The containerd feature [supports target snapshot references on prepare](https://github.com/containerd/containerd/pull/3793) is released by v1.4.x.
3838

39-
__[recommend]__ Now we support to start an overlaybd container by [`nerdctl`](https://github.com/containerd/nerdctl)[(#603)](https://github.com/containerd/nerdctl/pull/603).
39+
__[Recommend]__ Now we support to start an overlaybd container by [`nerdctl`](https://github.com/containerd/nerdctl)[(#603)](https://github.com/containerd/nerdctl/pull/603).
4040

4141
```bash
42-
sudo nerdctl run --rm -it --snapshotter=overlaybd registry.hub.docker.com/overlaybd/redis:6.2.1_obd
43-
```
44-
45-
And we also provide `ctr` subcommand `rpull` as plugin to use feature to support pulling image in on-demand mode.
46-
47-
```bash
48-
# you will see that the rpull doesn't pull layer data.
49-
sudo bin/ctr rpull registry.hub.docker.com/overlaybd/redis:6.2.1_obd
50-
```
51-
52-
And start a container based on this image.
53-
54-
```bash
55-
$ sudo nerdctl run --net host --rm --snapshotter=overlaybd registry.hub.docker.com/overlaybd/redis:6.2.1_obd
42+
$ sudo nerdctl run --net host -it --rm --snapshotter=overlaybd registry.hub.docker.com/overlaybd/redis:6.2.1_obd
5643

5744
1:C 03 Mar 2021 04:39:31.804 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5845
1:C 03 Mar 2021 04:39:31.804 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=1, just started
@@ -84,12 +71,16 @@ $ sudo nerdctl run --net host --rm --snapshotter=overlaybd registry.hub.docker.c
8471
1:M 03 Mar 2021 04:39:31.808 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
8572
1:M 03 Mar 2021 04:39:31.810 * Ready to accept connections
8673
```
87-
And also, you can use `ctr` to run this image:
88-
```
74+
75+
And also, you can use `ctr` to run this image. However, you should first use the subcommand `rpull` in the customized `bin/ctr` to pull image
76+
```bash
77+
# you will see that the rpull doesn't pull layer data.
78+
sudo bin/ctr rpull registry.hub.docker.com/overlaybd/redis:6.2.1_obd
79+
# start the container
8980
sudo ctr run --net-host --snapshotter=overlaybd --rm -t registry.hub.docker.com/overlaybd/redis:6.2.1_obd demo
9081
```
9182

92-
We could see a new iSCSI device (sdb) has been created, and its mount-point is the lowerdir of overlayfs.
83+
After container launched success, we could see a new iSCSI device (sdb) has been created, and its mount-point is the lowerdir of overlayfs.
9384
```bash
9485
$ sudo lsblk
9586
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

0 commit comments

Comments
 (0)