containers/youki

How to configure containerd to use youki instand of runc? Please provide the configuration guide.

Closed this issue · 4 comments

How to configure containerd to use youki instand of runc? Please provide the configuration guide.

@hlb-source @cuisongliu
Sorry, but we don't have the documentation for it. Could you contribute?
It will probably help you.

RUN <<EOF
set -e
echo '[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.youki]' >> /etc/containerd/config.toml
echo ' runtime_type = "io.containerd.runc.v2"' >> /etc/containerd/config.toml
echo ' [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.youki.options]' >> /etc/containerd/config.toml
echo ' BinaryName = "/usr/local/bin/youki"' >> /etc/containerd/config.toml
sed -i 's,SystemdCgroup = true,,' /etc/containerd/config.toml
EOF

If you are using containerd through docker you can follow this guide:
https://docs.docker.com/engine/alternative-runtimes/#youki

@hlb-source I've found that ctr supports a straightforward method for using youki instead of runc.

sudo ctr run -t --runc-binary /path/to/youki docker.io/library/ubuntu:latest youki-hello

You can also verify that it indeed uses youki by executing the command in another shell:

sudo ps auxf | grep -i youki
...
root     3041060  0.0  0.1 2217060 26880 pts/5   Sl+  11:03   0:00  |   |   |           \_ ctr run -t --runc-binary /path/to/youki docker.io/library/ubuntu:latest youki-hello
root     3041080  0.0  0.0 1236380 10536 ?       Sl   11:03   0:00 /usr/bin/containerd-shim-runc-v2 -namespace default -id youki-hello -address /run/containerd/containerd.sock