-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Akihiro Suda <[email protected]>
- Loading branch information
1 parent
a7a8b24
commit 815f60f
Showing
4 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
set -eux -o pipefail | ||
if [ "$(id -u)" != "0" ]; then | ||
echo "Must run as the root" | ||
exit 1 | ||
fi | ||
|
||
VERSION="2.0.0-beta.4" | ||
SHASHA="dfc9b122fea81a661f33a4013662b5def8a98fce84c257b8ad60e4279d11183e" | ||
|
||
arch="" | ||
case "$(uname -m)" in | ||
"x86_64") | ||
arch="amd64" | ||
;; | ||
"aarch64") | ||
arch="arm64" | ||
;; | ||
*) | ||
echo >&2 "Unsupported architecture" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
mkdir -p /root/nerdctl.tmp | ||
( | ||
cd /root/nerdctl.tmp | ||
wget https://github.com/containerd/nerdctl/releases/download/v${VERSION}/nerdctl-full-${VERSION}-linux-${arch}.tar.gz | ||
wget https://github.com/containerd/nerdctl/releases/download/v${VERSION}/SHA256SUMS | ||
[ "$(sha256sum SHA256SUMS | awk '{print $1}')" = "${SHASHA}" ] | ||
sha256sum --checksum --ignore-missing SHA256SUMS | ||
tar Cxzvvf /usr/local nerdctl-full-${VERSION}-linux-${arch}.tar.gz | ||
) | ||
rm -rf /root/nerdctl.tmp |
This file contains 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
This file contains 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