Skip to content

Commit

Permalink
Merge pull request #28 from AkihiroSuda/dev
Browse files Browse the repository at this point in the history
update containerd/nerdctl (v0.8.2)
  • Loading branch information
AkihiroSuda authored May 20, 2021
2 parents 8422cbb + 584ecec commit 9a2939f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/cidata/user-data.TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,17 @@ write_files:
EOF
chown -R "{{.User}}" "/home/{{.User}}.linux/.config"
fi
if [ ! -x /usr/local/bin/nerdctl -a "$(uname -m)" = "x86_64" ]; then
curl -fsSL https://github.com/containerd/nerdctl/releases/download/v0.8.1/nerdctl-full-0.8.1-linux-amd64.tar.gz | tar Cxz /usr/local
if [ ! -x /usr/local/bin/nerdctl ]; then
version="0.8.2"
goarch="amd64"
if [ "$(uname -m )" = "aarch64 "]; then
goarch="arm64"
fi
curl -fsSL https://github.com/containerd/nerdctl/releases/download/v${version}/nerdctl-full-${version}-linux-${goarch}.tar.gz | tar Cxz /usr/local
until [ -e "/run/user/{{.UID}}/systemd/private" ]; do sleep 3; done
sudo -iu "{{.User}}" "XDG_RUNTIME_DIR=/run/user/{{.UID}}" containerd-rootless-setuptool.sh install
sudo -iu "{{.User}}" "XDG_RUNTIME_DIR=/run/user/{{.UID}}" containerd-rootless-setuptool.sh install-buildkit
sudo -iu "{{.User}}" "XDG_RUNTIME_DIR=/run/user/{{.UID}}" containerd-rootless-setuptool.sh install-stargz
else
echo "TODO: install containerd for aarch64 (https://github.com/containerd/nerdctl/issues/191)"
fi
owner: root:root
path: /var/lib/cloud/scripts/per-boot/20-install-containerd.boot.sh
Expand Down

0 comments on commit 9a2939f

Please sign in to comment.