add release build-arg for multiarch builds

This commit is contained in:
Harshavardhana
2021-03-10 00:10:53 -08:00
parent 28d8677578
commit dde89f7604
2 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -2,6 +2,8 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
ARG TARGETARCH
ARG RELEASE
LABEL maintainer="MinIO Inc <dev@min.io>"
COPY CREDITS /licenses/CREDITS
@@ -11,7 +13,7 @@ RUN \
microdnf update --nodocs && \
microdnf install curl ca-certificates shadow-utils --nodocs && \
microdnf clean all && \
curl -s -q https://dl.minio.io/client/mc/release/linux-${TARGETARCH}/mc -o /usr/bin/mc && \
curl -s -q https://dl.minio.io/client/mc/release/linux-${TARGETARCH}/archive/mc.${RELEASE} -o /usr/bin/mc && \
chmod +x /usr/bin/mc
ENTRYPOINT ["mc"]
+6 -4
View File
@@ -2,15 +2,17 @@
sudo sysctl net.ipv6.conf.wlp59s0.disable_ipv6=1
docker buildx build --push --no-cache -t "minio/mc:latest" \
release=$(git describe --abbrev=0 --tags)
docker buildx build --push --no-cache \
--build-arg RELEASE="${release}" -t "minio/mc:latest" \
--platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \
-f Dockerfile.release .
docker buildx prune -f
release=$(git describe --abbrev=0 --tags)
docker buildx build --push --no-cache -t "minio/mc:${release}" \
docker buildx build --push --no-cache \
--build-arg RELEASE="${release}" -t "minio/mc:${release}" \
--platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \
-f Dockerfile.release .