From 94459d6346d63d09cdc32bcf30f712af1bb540cb Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Tue, 23 Apr 2024 21:45:37 -0500 Subject: [PATCH] build: add cni plugins Run with: depot build . --build-arg BUILDKIT_VERSION=v0.11.6-depot.37 --build-arg MACHINE_AGENT_VERSION=v1.44.0 --build-arg CNI_VERSION=v1.4.0 --platform linux/amd64 -f Dockerfile.flyio Signed-off-by: Chris Goller --- Dockerfile.flyio | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile.flyio b/Dockerfile.flyio index 2a5cc14..dc86838 100644 --- a/Dockerfile.flyio +++ b/Dockerfile.flyio @@ -3,6 +3,7 @@ FROM --platform=$TARGETPLATFORM amazonlinux ARG TARGETARCH ARG BUILDKIT_VERSION ARG MACHINE_AGENT_VERSION +ARG CNI_VERSION RUN dnf upgrade -y && \ dnf install -y htop wget git lsof fuse3 tar pigz e2fsprogs psmisc && \ @@ -12,10 +13,15 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN mkdir -p /etc/buildkit && \ curl -L "https://github.com/depot/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-${TARGETARCH}.tar.gz" | \ - tar -xz -C /usr/bin --strip-components=1 + tar -zxv -C /usr/bin --strip-components=1 RUN curl -L "https://dl.depot.dev/machine-agent/download/linux/$(uname -m)/${MACHINE_AGENT_VERSION}" | \ - tar -zx --strip-components=1 --directory /usr/bin bin/machine-agent + tar -zxv --strip-components=1 --directory /usr/bin bin/machine-agent + +RUN mkdir -p /opt/cni/bin/ && \ + curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-${TARGETARCH}-${CNI_VERSION}.tgz" | \ + tar -C /opt/cni/bin/ -zxv + # TODO: install vector # TODO: binfmt/dagger engine