summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorCrazyMax <crazy-max@users.noreply.github.com>2022-11-19 02:36:28 +0100
committerCrazyMax <crazy-max@users.noreply.github.com>2022-12-15 15:02:20 +0100
commit69c9dfd6d5bea04a6a5b143c5f7edc416ab4fbde (patch)
treeea28b66b785cd0aab4ddb3393809e92651961c60 /Dockerfile
parent6cba7d22e91672bd4cd1be82600562bd04e902ad (diff)
downloaddocker-69c9dfd6d5bea04a6a5b143c5f7edc416ab4fbde.tar.gz
Dockerfile: add dummy stage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 9a082b6bf2..6d13cacf74 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,6 +14,13 @@ ARG DEBIAN_FRONTEND=noninteractive
# cross compilation helper
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
+# dummy stage to make sure the image is built for deps that don't support some
+# architectures
+FROM --platform=$BUILDPLATFORM busybox AS build-dummy
+RUN mkdir -p /build
+FROM scratch AS binary-dummy
+COPY --from=build-dummy /build /build
+
# base
FROM --platform=$BUILDPLATFORM ${GOLANG_IMAGE} AS base
COPY --from=xx / /