This commit replaces the UBI minimal with the small and less bloated UBI micro image. This reduces noise from security scanners flagging components not used by mc and reduces the overall size of the container. Signed-off-by: Andreas Auernhammer <github@aead.dev>
25 lines
793 B
Docker
25 lines
793 B
Docker
FROM --platform=linux/amd64 registry.access.redhat.com/ubi8/ubi-minimal:8.8 as build
|
|
|
|
RUN microdnf update --nodocs && microdnf install ca-certificates --nodocs && microdnf clean all
|
|
|
|
FROM registry.access.redhat.com/ubi8/ubi-micro:8.8
|
|
|
|
ARG TARGETARCH
|
|
ARG RELEASE
|
|
|
|
LABEL maintainer="MinIO Inc <dev@min.io>"
|
|
|
|
# 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
|
|
|
|
RUN \
|
|
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"]
|