From 584ecece9c61a92b8ca5c946d24cab9ecc036893 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Thu, 20 May 2021 14:26:10 +0900 Subject: [PATCH] update containerd/nerdctl (v0.8.2) Signed-off-by: Akihiro Suda --- pkg/cidata/user-data.TEMPLATE | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/cidata/user-data.TEMPLATE b/pkg/cidata/user-data.TEMPLATE index 7168173aef1..130c6a8f711 100644 --- a/pkg/cidata/user-data.TEMPLATE +++ b/pkg/cidata/user-data.TEMPLATE @@ -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