Skip to content

Commit 42c60ba

Browse files
committed
Improve 'Quick start' documentation clarity
- Add link to OpenWrt - Reword descriptions of system workload examples - Rewrite one-liner Dockerfiles using heredocs
1 parent 9edb8b2 commit 42c60ba

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ NODES=3 MTU=9000 ./test
6262

6363
### System workloads
6464

65-
Launch OpenWRT with port forward to LuCI web UI on port 10080:
65+
Launch [OpenWrt](https://openwrt.org/) with port forward to LuCI web UI on port 10080:
6666

6767
```console
6868
docker import --change='ENTRYPOINT ["/sbin/init"]' https://archive.openwrt.org/releases/23.05.2/targets/x86/generic/openwrt-23.05.2-x86-generic-rootfs.tar.gz openwrt-23.05.2 && \
@@ -71,19 +71,38 @@ echo -e "config interface 'loopback'\n\toption device 'lo'\n\toption proto 'stat
7171
docker run -it --rm --runtime=runcvm --name=openwrt --network=runcvm-openwrt --ip=172.128.0.5 -v /tmp/runcvm-openwrt-network:/etc/config/network -p 10080:80 openwrt-23.05.2
7272
```
7373

74-
Launch Ubuntu with Docker and [Sysbox](https://github.com/nestybox/sysbox) runtime, then within it run an Alpine _Sysbox_ container and, _within that_ install dockerd and run a container from the 'hello-world' image:
74+
Launch Ubuntu running Systemd and Docker with [Sysbox](https://github.com/nestybox/sysbox) runtime; then within it run an Alpine _Sysbox_ container; and, _within that_ install dockerd and run a container from the 'hello-world' image:
7575

7676
```console
77-
echo -e "FROM ubuntu:jammy\nRUN apt update && apt -y install apt-utils kmod wget iproute2 systemd ca-certificates curl gnupg udev dbus && curl -fsSL https://get.docker.com | bash\nRUN wget -O /tmp/sysbox.deb https://downloads.nestybox.com/sysbox/releases/v0.6.2/sysbox-ce_0.6.2-0.linux_amd64.deb && apt -y install /tmp/sysbox.deb\nENTRYPOINT [\"/lib/systemd/systemd\"]" | docker build --tag=ubuntu-docker-sysbox -
77+
cat <<EOF | docker build --tag=ubuntu-docker-sysbox -
78+
FROM ubuntu:jammy
79+
RUN apt update && apt -y install apt-utils kmod wget iproute2 systemd \
80+
ca-certificates curl gnupg udev dbus && \
81+
curl -fsSL https://get.docker.com | bash
82+
RUN wget -O /tmp/sysbox.deb \
83+
https://downloads.nestybox.com/sysbox/releases/v0.6.2/sysbox-ce_0.6.2-0.linux_amd64.deb && \
84+
apt -y install /tmp/sysbox.deb
85+
ENTRYPOINT ["/lib/systemd/systemd"]
86+
EOF
7887
docker run -d --runtime=runcvm -m 2g --name=ubuntu-docker-sysbox --env=RUNCVM_DISKS='/disks/docker,/var/lib/docker,ext4,1G;/disks/sysbox,/var/lib/sysbox,ext4,1G' ubuntu-docker-sysbox
7988
docker exec ubuntu-docker-sysbox bash -c "docker run --rm --runtime=sysbox-runc alpine ash -x -c 'apk add docker; dockerd &>/dev/null & sleep 5; docker run --rm hello-world'"
8089
docker rm -f ubuntu-docker-sysbox
8190
```
8291

83-
Launch Ubuntu with Docker and RunCVM runtime installed, then within it run an Alpine _RunCVM_ container-VM, and within that install dockerd and, _within that_, run a container from the 'hello-world' image:
92+
**Nested RunCVM demo** -- Launch Ubuntu running Systemd and Docker with RunCVM runtime installed; then within it run an Alpine _RunCVM_ container-VM; and, within that install dockerd and, _within that_, run a container from the 'hello-world' image:
8493

8594
```console
86-
echo -e "FROM ubuntu:jammy\nRUN apt update && apt -y install apt-utils kmod wget iproute2 systemd ca-certificates curl gnupg udev dbus && curl -fsSL https://get.docker.com | bash\nCOPY --from=newsnowlabs/runcvm:latest /opt /opt/\nRUN rm -f /etc/init.d/docker && bash /opt/runcvm/scripts/runcvm-install-runtime.sh --no-dockerd && echo kvm_intel >>/etc/modules\nENTRYPOINT [\"/lib/systemd/systemd\"]" | docker build --tag=ubuntu-docker-runcvm -
95+
cat <<EOF | docker build --tag=ubuntu-docker-runcvm -
96+
FROM ubuntu:jammy
97+
RUN apt update && apt -y install apt-utils kmod wget iproute2 systemd \
98+
ca-certificates curl gnupg udev dbus && \
99+
curl -fsSL https://get.docker.com | bash
100+
COPY --from=newsnowlabs/runcvm:latest /opt /opt/
101+
RUN rm -f /etc/init.d/docker && \
102+
bash /opt/runcvm/scripts/runcvm-install-runtime.sh --no-dockerd && \
103+
echo kvm_intel >>/etc/modules
104+
ENTRYPOINT ["/lib/systemd/systemd"]
105+
EOF
87106
docker run -d --runtime=runcvm -m 2g --name=ubuntu-docker-runcvm --env=RUNCVM_DISKS='/disks/docker,/var/lib/docker,ext4,1G' ubuntu-docker-runcvm
88107
docker exec ubuntu-docker-runcvm bash -c "docker run --rm --runtime=runcvm alpine ash -x -c 'apk add docker; dockerd &>/dev/null & sleep 5; docker run --rm hello-world'"
89108
docker rm -f ubuntu-docker-runcvm

0 commit comments

Comments
 (0)