From 33272332071a17f8be197fd57fbb66487ac0e2bf Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Fri, 13 Jan 2023 22:38:17 +0100 Subject: [PATCH] fix: fix docker-buildx binary in multiarch container builds (#175) --- Dockerfile.multiarch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile.multiarch b/Dockerfile.multiarch index bb062e0..19027ba 100644 --- a/Dockerfile.multiarch +++ b/Dockerfile.multiarch @@ -17,6 +17,8 @@ LABEL org.opencontainers.image.url="https://github.com/thegeeklab/drone-docker-b LABEL org.opencontainers.image.source="https://github.com/thegeeklab/drone-docker-buildx" LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/drone-docker-buildx" +ARG TARGETOS +ARG TARGETARCH ARG BUILDX_VERSION # renovate: datasource=github-releases depName=docker/buildx @@ -27,7 +29,8 @@ ENV DOCKER_HOST=unix:///var/run/docker.sock RUN apk --update add --virtual .build-deps curl && \ apk --update add --no-cache git && \ mkdir -p /usr/lib/docker/cli-plugins/ && \ - curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION##v}/buildx-v${BUILDX_VERSION##v}.linux-amd64" && \ + curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx \ + "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION##v}/buildx-v${BUILDX_VERSION##v}.${TARGETOS:-linux}-${TARGETARCH:-amd64}" && \ chmod 755 /usr/lib/docker/cli-plugins/docker-buildx && \ apk del .build-deps && \ rm -rf /var/cache/apk/* && \