From de2013eb9b764f9d1ad19fd579c667469fcd6b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Wed, 18 Nov 2020 07:58:44 +0100 Subject: [PATCH] Install buildkit binary for use with containerd --- deploy/kicbase/Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deploy/kicbase/Dockerfile b/deploy/kicbase/Dockerfile index 13bd51a0e0c7..55a7176e2a77 100644 --- a/deploy/kicbase/Dockerfile +++ b/deploy/kicbase/Dockerfile @@ -21,6 +21,8 @@ # for a kubernetes node image, it doesn't contain much we don't need FROM ubuntu:focal-20200925 +ARG BUILDKIT_VERSION="v0.7.2" + # copy in static files (configs, scripts) COPY 10-network-security.conf /etc/sysctl.d/10-network-security.conf COPY 11-tcp-mtu-probing.conf /etc/sysctl.d/11-tcp-mtu-probing.conf @@ -106,6 +108,17 @@ RUN sh -c "echo 'deb https://download.docker.com/linux/ubuntu focal stable' > /e apt-key add - < docker.key && \ clean-install docker-ce docker-ce-cli containerd.io +# install buildkit +RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/armhf/arm-v7/') \ + && echo "Installing buildkit ..." \ + && export BUILDKIT_BASE_URL="https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}" \ + && curl -sSL --retry 5 --output /tmp/buildkit.tgz "${BUILDKIT_BASE_URL}/buildkit-${BUILDKIT_VERSION}.linux-${ARCH}.tar.gz" \ + && tar -C /usr/local -xzvf /tmp/buildkit.tgz \ + && rm -rf /tmp/buildkit.tgz \ + && chmod 755 /usr/local/bin/buildctl \ + && chmod 755 /usr/local/bin/buildkit-runc \ + && chmod 755 /usr/local/bin/buildkitd + # Install cri-o/podman dependencies: RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_20.04/Release.key && \