Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 3327233

Browse files
authored
fix: fix docker-buildx binary in multiarch container builds (#175)
1 parent 182782c commit 3327233

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile.multiarch

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ LABEL org.opencontainers.image.url="https://github.com/thegeeklab/drone-docker-b
1717
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/drone-docker-buildx"
1818
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/drone-docker-buildx"
1919

20+
ARG TARGETOS
21+
ARG TARGETARCH
2022
ARG BUILDX_VERSION
2123

2224
# renovate: datasource=github-releases depName=docker/buildx
@@ -27,7 +29,8 @@ ENV DOCKER_HOST=unix:///var/run/docker.sock
2729
RUN apk --update add --virtual .build-deps curl && \
2830
apk --update add --no-cache git && \
2931
mkdir -p /usr/lib/docker/cli-plugins/ && \
30-
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" && \
32+
curl -SsL -o /usr/lib/docker/cli-plugins/docker-buildx \
33+
"https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION##v}/buildx-v${BUILDX_VERSION##v}.${TARGETOS:-linux}-${TARGETARCH:-amd64}" && \
3134
chmod 755 /usr/lib/docker/cli-plugins/docker-buildx && \
3235
apk del .build-deps && \
3336
rm -rf /var/cache/apk/* && \

0 commit comments

Comments
 (0)