Skip to content

Commit

Permalink
fix: broken docker builds for microdnf command (#4746)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored Nov 8, 2023
1 parent a5adf14 commit 7db80b6
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ COPY CREDITS /licenses/CREDITS
COPY LICENSE /licenses/LICENSE

RUN \
microdnf update --nodocs && \
microdnf install ca-certificates --nodocs && \
microdnf update --nodocs --assumeyes && \
microdnf install ca-certificates --nodocs --assumeyes && \
microdnf clean all

ENTRYPOINT ["mc"]
6 changes: 3 additions & 3 deletions Dockerfile.hotfix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:latest as build

RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all
RUN microdnf update --nodocs --assumeyes && microdnf install ca-certificates --nodocs --assumeyes

FROM registry.access.redhat.com/ubi9/ubi-micro:9.2
FROM registry.access.redhat.com/ubi9/ubi-micro:latest

ARG TARGETARCH
ARG RELEASE
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:latest as build

RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all
RUN microdnf update --nodocs --assumeyes && microdnf install ca-certificates --nodocs --assumeyes

FROM registry.access.redhat.com/ubi9/ubi-micro:9.2
FROM registry.access.redhat.com/ubi9/ubi-micro:latest

ARG TARGETARCH
ARG RELEASE
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.release.fips
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.2 as build
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:latest as build

RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all
RUN microdnf update --nodocs --assumeyes && microdnf install ca-certificates --nodocs --assumeyes

FROM registry.access.redhat.com/ubi9/ubi-micro:9.2
FROM registry.access.redhat.com/ubi9/ubi-micro:latest

ARG TARGETARCH
ARG RELEASE
Expand Down
24 changes: 24 additions & 0 deletions Dockerfile.release.old_cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:latest as build

RUN microdnf update --nodocs --assumeyes && microdnf install ca-certificates --nodocs --assumeyes

FROM registry.access.redhat.com/ubi8/ubi-micro:latest

ARG TARGETARCH
ARG RELEASE

LABEL maintainer="MinIO Inc <[email protected]>"

# On RHEL the certificate bundle is located at:
# - /etc/pki/tls/certs/ca-bundle.crt (RHEL 6)
# - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem (RHEL 7)
COPY --from=build /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/

COPY CREDITS /licenses/CREDITS
COPY LICENSE /licenses/LICENSE

ADD https://dl.minio.io/client/mc/release/linux-${TARGETARCH}/archive/mc.${RELEASE} /usr/bin/mc

RUN chmod +x /usr/bin/mc

ENTRYPOINT ["mc"]
11 changes: 10 additions & 1 deletion docker-buildx.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2015-2021 MinIO, Inc.
# Copyright (c) 2015-2023 MinIO, Inc.
#
# This file is part of MinIO Object Storage stack
#
Expand Down Expand Up @@ -33,6 +33,15 @@ docker buildx build --push --no-cache \

docker buildx prune -f

docker buildx build --push --no-cache \
--build-arg RELEASE="${release}" \
-t "minio/minio:${release}-cpuv1" \
-t "quay.io/minio/minio:${release}-cpuv1" \
--platform=linux/arm64,linux/amd64,linux/ppc64le,linux/s390x \
-f Dockerfile.release.old_cpu .

docker buildx prune -f

docker buildx build --push --no-cache \
--build-arg RELEASE="${release}" \
-t "minio/minio:${release}.fips" \
Expand Down

0 comments on commit 7db80b6

Please sign in to comment.