-
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
635c2c4
commit a8301ef
Showing
5 changed files
with
60 additions
and
5 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
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,40 @@ | ||
#!/bin/bash | ||
set -eux -o pipefail | ||
if [ "$(id -u)" != "0" ]; then | ||
echo "Must run as the root" | ||
exit 1 | ||
fi | ||
|
||
VERSION="2.0.0-rc.1" | ||
SHASHA="7086527171059921baf076ec0111881c6f411ff0b672623e7cb4bb69fd93226c" | ||
|
||
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 | ||
curl -fSLO https://github.com/containerd/nerdctl/releases/download/v${VERSION}/nerdctl-full-${VERSION}-linux-${arch}.tar.gz | ||
curl -fSLO https://github.com/containerd/nerdctl/releases/download/v${VERSION}/SHA256SUMS | ||
[ "$(sha256sum SHA256SUMS | awk '{print $1}')" = "${SHASHA}" ] | ||
sha256sum --check --ignore-missing SHA256SUMS | ||
tar Cxzvvf /usr/local nerdctl-full-${VERSION}-linux-${arch}.tar.gz | ||
) | ||
rm -rf /root/nerdctl.tmp | ||
|
||
if [ -e /etc/apparmor.d/rootlesskit ]; then | ||
# https://rootlesscontaine.rs/getting-started/common/apparmor/ | ||
sed -e s@/usr/bin/rootlesskit@/usr/local/bin/rootlesskit@g /etc/apparmor.d/rootlesskit >/etc/apparmor.d/usr.local.bin.rootlesskit | ||
systemctl restart apparmor | ||
fi |
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