Skip to content

Instantly share code, notes, and snippets.

@yankay
Last active December 17, 2024 04:16
Show Gist options
  • Save yankay/167d359d7f919a380991d99128c440ce to your computer and use it in GitHub Desktop.
Save yankay/167d359d7f919a380991d99128c440ce to your computer and use it in GitHub Desktop.
快速安装 nerdctl
cd /tmp
export NERDCTL_VERSION=$(curl -s https://api.github.com/repos/containerd/nerdctl/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' )
export NERDCTL_VERSION=${NERDCTL_VERSION:1:100}
wget https://files.m.daocloud.io/github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz
tar -zxvf nerdctl-${NERDCTL_VERSION}-linux-amd64.tar.gz
chmod +x nerdctl
mv nerdctl /usr/local/bin/nerdctl
nerdctl version
cd /tmp
export NERDCTL_VERSION=$(curl -s https://api.github.com/repos/containerd/nerdctl/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' )
export NERDCTL_VERSION=${NERDCTL_VERSION:1:100}
wget https://files.m.daocloud.io/github.com/containerd/nerdctl/releases/download/v${NERDCTL_VERSION}/nerdctl-full-${NERDCTL_VERSION}-linux-amd64.tar.gz
cat nerdctl-full-${NERDCTL_VERSION}-linux-amd64.tar.gz | sudo tar -xvz -C /usr/local
systemctl daemon-reload
systemctl enable --now containerd
ctr version
nerdctl version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment