add release build-arg to docker multiarch builds (#11752)

This commit is contained in:
Harshavardhana 2021-03-10 09:41:44 -08:00 committed by GitHub
parent 952b0f111d
commit 3ffe520643
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View File

@ -2,11 +2,13 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
ARG TARGETARCH ARG TARGETARCH
ARG RELEASE
LABEL name="MinIO" \ LABEL name="MinIO" \
vendor="MinIO Inc <dev@min.io>" \ vendor="MinIO Inc <dev@min.io>" \
maintainer="MinIO Inc <dev@min.io>" \ maintainer="MinIO Inc <dev@min.io>" \
version="RELEASE.2021-03-10T05-11-33Z" \ version="${RELEASE}" \
release="RELEASE.2021-03-10T05-11-33Z" \ release="${RELEASE}" \
summary="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service." \ summary="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service." \
description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads." description="MinIO object storage is fundamentally different. Designed for performance and the S3 API, it is 100% open-source. MinIO is ideal for large, private cloud environments with stringent security requirements and delivers mission-critical availability across a diverse range of workloads."
@ -28,9 +30,9 @@ RUN \
microdnf install curl ca-certificates shadow-utils util-linux --nodocs && \ microdnf install curl ca-certificates shadow-utils util-linux --nodocs && \
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
microdnf install minisign --nodocs && \ microdnf install minisign --nodocs && \
curl -s -q https://dl.min.io/server/minio/release/linux-${TARGETARCH}/minio -o /usr/bin/minio && \ curl -s -q https://dl.min.io/server/minio/release/linux-${TARGETARCH}/archive/minio.${RELEASE} -o /usr/bin/minio && \
curl -s -q https://dl.min.io/server/minio/release/linux-${TARGETARCH}/minio.sha256sum -o /usr/bin/minio.sha256sum && \ curl -s -q https://dl.min.io/server/minio/release/linux-${TARGETARCH}/archive/minio.${RELEASE}.sha256sum -o /usr/bin/minio.sha256sum && \
curl -s -q https://dl.min.io/server/minio/release/linux-${TARGETARCH}/minio.minisig -o /usr/bin/minio.minisig && \ curl -s -q https://dl.min.io/server/minio/release/linux-${TARGETARCH}/archive/minio.${RELEASE}.minisig -o /usr/bin/minio.minisig && \
microdnf clean all && \ microdnf clean all && \
chmod +x /usr/bin/minio && \ chmod +x /usr/bin/minio && \
chmod +x /usr/bin/docker-entrypoint.sh && \ chmod +x /usr/bin/docker-entrypoint.sh && \

View File

@ -2,15 +2,17 @@
sudo sysctl net.ipv6.conf.wlp59s0.disable_ipv6=1 sudo sysctl net.ipv6.conf.wlp59s0.disable_ipv6=1
docker buildx build --push --no-cache -t "minio/minio:latest" \ release=$(git describe --abbrev=0 --tags)
docker buildx build --push --no-cache \
--build-arg RELEASE="${release}" -t "minio/minio:latest" \
--platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \ --platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \
-f Dockerfile.release . -f Dockerfile.release .
docker buildx prune -f docker buildx prune -f
release=$(git describe --abbrev=0 --tags) docker buildx build --push --no-cache \
--build-arg RELEASE="${release}" -t "minio/minio:${release}" \
docker buildx build --push --no-cache -t "minio/minio:${release}" \
--platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \ --platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \
-f Dockerfile.release . -f Dockerfile.release .