sudo apt-get install -y libseccomp-dev build-essential curl git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
git clone https://github.com/containerd/runwasi.git cd runwasi
cargo build --release --target=x86_64-unknown-linux-gnu --target-dir=./target/ -p containerd-shim-wasmtime
cargo build --release --target=aarch64-unknown-linux-gnu --target-dir=./target/ -p containerd-shim-wasmtime
cargo build --target=x86_64-unknown-linux-gnu --target-dir=./target/ -p containerd-shim-wasmtime
sudo cp ~/runwasi/target/aarch64-unknown-linux-gnu/release/containerd-shim-wasmtime-v1 /usr/local/bin/containerd-shim-wasmtime
sudo cp ~/runwasi/target/x86_64-unknown-linux-gnu/release/containerd-shim-wasmtime-v2 /usr/local/bin/containerd-shim-wasmtime-v2
wget https://github.com/containerd/containerd/releases/download/v1.7.15/containerd-1.7.15-linux-arm64.tar.gz
sudo tar Cxzvf /usr/local containerd-1.7.15-linux-arm64.tar.gz
sudo tee /etc/systemd/system/containerd.service <<EOF [Unit] Description=containerd container runtime Documentation=https://containerd.io After=network.target
[Service] ExecStart=/usr/local/bin/containerd Delegate=yes KillMode=process LimitNOFILE=1048576 LimitNPROC=infinity LimitCORE=infinity
[Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload
sudo systemctl enable --now containerd
sudo nano /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.wasmtime] runtime_type = "io.containerd.wasmtime.v1" runtime_engine = "/usr/local/bin/containerd-shim-wasmtime" runtime_root = ""
sudo systemctl restart containerd
sudo systemctl status containerd
ctr runtime list (should have wasmtime)
ls ./target/aarch64-unknown-linux-gnu/debug/
Copying the binary to /usr/local/bin
sudo cp ./target/aarch64-unknown-linux-gnu/debug/containerd-shim-wasmtime /usr/local/bin/
Confirm that the binary is correctly placed
ls -l /usr/local/bin/containerd-shim-wasmtime
sudo systemctl restart containerd
Assuming we already extracted and placed the containerd binary in /usr/local/bin, the command to create a systemd service file would be:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
newgrp docker
sudo apt-get install containerd-tools