From fa685d7d9ce624e5bbf0b55397afb15b3ae08994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Mon, 13 Apr 2020 05:03:02 +0200 Subject: [PATCH] Make multistage Dockerfile self-contained (#9323) Picking up all support files from the builder image has the advantage that the Dockerfile is now fully selfcontained and can be also run just standalone. This allows also cross-compilation and pushing with the proper manifests with Docker Buildkit: ``` docker buildx create --name xbuilder docker buildx use xbuilder docker buildx build -f Dockerfile.minio --platform linux/arm/v7,linux/amd64 --progress plain --push -t minio/minio . ``` which also has the advantage that the Dockerfile is the same for all platforms. Co-authored-by: Harshavardhana --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 23a844aba..a05293f0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ ENV MINIO_ACCESS_KEY_FILE=access_key \ EXPOSE 9000 COPY --from=0 /go/bin/minio /usr/bin/minio -COPY CREDITS /third_party/ -COPY dockerscripts/docker-entrypoint.sh /usr/bin/ +COPY --from=0 /go/minio/CREDITS /third_party/ +COPY --from=0 /go/minio/dockerscripts/docker-entrypoint.sh /usr/bin/ RUN \ apk add --no-cache ca-certificates 'curl>7.61.0' 'su-exec>=0.2' && \