Last active
August 5, 2025 21:19
-
-
Save eumel8/9aad0a340a0123b0586bf55f4be0eb77 to your computer and use it in GitHub Desktop.
Install Nerdctl/Containerd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/containerd/nerdctl/releases/latest | |
| # https://github.com/containerd/nerdctl/blob/main/docs/rootless.md | |
| # https://rootlesscontaine.rs/getting-started/common/ | |
| # https://github.com/containernetworking/plugins | |
| VERSION=2.1.3 | |
| mkdir nerd | |
| cd nerd | |
| # Download the all-in-one archive | |
| curl -LO https://github.com/containerd/nerdctl/releases/download/v${VERSION}/nerdctl-${VERSION}-linux-amd64.tar.gz | |
| # Extract | |
| tar -xzf nerdctl-${VERSION}-linux-amd64.tar.gz | |
| rm nerdctl-${VERSION}-linux-amd64.tar.gz | |
| cp * ~/bin/ | |
| # Install | |
| sudo apt install slirp4netns rootlesskit containerd iptables | |
| # check | |
| containerd-rootless-setuptool.sh check | |
| # setup | |
| containerd-rootless-setuptool.sh install | |
| # install cni | |
| sudo mkdir -p /opt/cni/bin | |
| cd /opt/cni/bin | |
| # Download latest CNI plugins (adjust for latest version if needed) | |
| sudo curl -LO https://github.com/containernetworking/plugins/releases/download/v1.7.1/cni-plugins-linux-amd64-v1.7.1.tgz | |
| # Extract them | |
| sudo tar -xvf cni-plugins-linux-amd64-v1.7.1.tgz | |
| # Clean up | |
| sudo rm cni-plugins-linux-amd64-v1.7.1.tgz | |
| # test | |
| nerdctl run hello-world | |
| # install buildkitd | |
| cd | |
| cd nerd | |
| curl -LO https://github.com/moby/buildkit/releases/download/v0.23.2/buildkit-v0.23.2.linux-amd64.tar.gz | |
| tar xfz buildkit-v0.23.2.linux-amd64.tar.gz | |
| cp bin/* ~/bin/ | |
| containerd-rootless-setuptool.sh install-buildkit | |
| # Make a test Dockerfile | |
| echo -e "FROM alpine\nCMD echo Hello from nerdctl" > Dockerfile | |
| # Build it | |
| nerdctl build -t test-image . | |
| # Run it | |
| nerdctl run test-image | |
| # bash completion | |
| nerdctl completion bash | sudo tee /etc/bash_completion.d/nerdctl |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
proxy settings in /usr/lib/systemd/system/containerd.service
reload daemon