-
-
Save azlkiniue/19d091c4a13c6a446c1417185134d3f2 to your computer and use it in GitHub Desktop.
Install containerd and nerdctl on Ubuntu
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
| # adapted from https://github.com/ArmDeveloperEcosystem/arm-learning-paths/blob/main/content/install-guides/nerdctl.md | |
| # modified for amd64 | |
| CONTAINERD_VERSION=$(curl -s https://api.github.com/repos/containerd/containerd/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//') | |
| wget https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz | |
| sudo tar Cxzvf /usr/local containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz | |
| rm containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz | |
| wget https://raw.githubusercontent.com/containerd/containerd/main/containerd.service | |
| mv containerd.service /usr/local/lib/systemd/system/containerd.service | |
| sudo systemctl daemon-reload | |
| sudo systemctl enable --now containerd | |
| RUNC_VERSION=$(curl -s https://api.github.com/repos/opencontainers/runc/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//') | |
| wget https://github.com/opencontainers/runc/releases/download/v${RUNC_VERSION}/runc.amd64 | |
| sudo install -m 755 runc.amd64 /usr/local/sbin/runc | |
| NERDCTL_VERSION=$(curl -s https://api.github.com/repos/containerd/nerdctl/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//') | |
| wget https://github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz | |
| sudo tar -xzvf nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz -C /usr/local/bin | |
| rm nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz | |
| CNI_VERSION=$(curl -s https://api.github.com/repos/containernetworking/plugins/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//') | |
| wget https://github.com/containernetworking/plugins/releases/download/v${CNI_VERSION}/cni-plugins-linux-amd64-v${CNI_VERSION}.tgz | |
| sudo mkdir -p /opt/cni/bin | |
| sudo tar -xzvf cni-plugins-linux-amd64-v${CNI_VERSION}.tgz -C /opt/cni/bin | |
| rm cni-plugins-linux-amd64-v${CNI_VERSION}.tgz | |
| # https://github.com/moby/buildkit for building images | |
| BUILDKIT_VERSION=$(curl -s https://api.github.com/repos/moby/buildkit/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//') | |
| wget https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz | |
| sudo tar -xzvf buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz -C /usr | |
| rm buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment