diff --git a/Dockerfile b/Dockerfile index a11c4891..c3f586b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.13-alpine as build +FROM golang:1.15-alpine as builder LABEL maintainer="MinIO Inc " @@ -11,12 +11,17 @@ RUN \ git clone https://github.com/minio/mc && cd mc && \ go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)" -FROM alpine:3.12 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 -COPY --from=build /go/bin/mc /usr/bin/mc +ARG TARGETARCH + +COPY --from=builder /go/bin/mc /usr/bin/mc +COPY --from=builder /go/mc/CREDITS /licenses/CREDITS +COPY --from=builder /go/mc/LICENSE /licenses/LICENSE RUN \ - apk add --no-cache ca-certificates 'curl>7.61.0' && \ - curl -s -q -O https://raw.githubusercontent.com/minio/minio/master/CREDITS + microdnf update --nodocs && \ + microdnf install ca-certificates --nodocs && \ + microdnf clean all ENTRYPOINT ["mc"] diff --git a/Dockerfile.arm.release b/Dockerfile.arm.release deleted file mode 100644 index 9eecaa4e..00000000 --- a/Dockerfile.arm.release +++ /dev/null @@ -1,13 +0,0 @@ -FROM multiarch/qemu-user-static:x86_64-arm as qemu -FROM arm32v7/alpine:3.12 - -LABEL maintainer="MinIO Inc " - -COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin - -RUN apk add --no-cache ca-certificates 'curl>7.61.0' && \ - curl -s -q https://dl.minio.io/client/mc/release/linux-arm/mc -o /usr/bin/mc && \ - chmod +x /usr/bin/mc && \ - curl -s -q -O https://raw.githubusercontent.com/minio/minio/master/CREDITS - -ENTRYPOINT ["mc"] diff --git a/Dockerfile.arm64.release b/Dockerfile.arm64.release deleted file mode 100644 index b472a4c6..00000000 --- a/Dockerfile.arm64.release +++ /dev/null @@ -1,13 +0,0 @@ -FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu -FROM arm64v8/alpine:3.12 - -LABEL maintainer="MinIO Inc " - -COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin - -RUN apk add --no-cache ca-certificates 'curl>7.61.0' && \ - curl -s -q https://dl.minio.io/client/mc/release/linux-arm64/mc -o /usr/bin/mc && \ - chmod +x /usr/bin/mc && \ - curl -s -q -O https://raw.githubusercontent.com/minio/minio/master/CREDITS - -ENTRYPOINT ["mc"] diff --git a/Dockerfile.dev b/Dockerfile.dev index 562fa3cc..239baffc 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,8 +1,14 @@ -FROM alpine:3.12 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +LABEL maintainer="MinIO Inc " COPY mc /usr/bin/ -COPY CREDITS / +COPY CREDITS /licenses/CREDITS +COPY LICENSE /licenses/LICENSE -RUN apk add --no-cache ca-certificates +RUN \ + microdnf update --nodocs && \ + microdnf install ca-certificates --nodocs && \ + microdnf clean all ENTRYPOINT ["mc"] diff --git a/Dockerfile.ppc64le.release b/Dockerfile.ppc64le.release deleted file mode 100644 index f25c6138..00000000 --- a/Dockerfile.ppc64le.release +++ /dev/null @@ -1,13 +0,0 @@ -FROM multiarch/qemu-user-static:x86_64-ppc64le as qemu -FROM ppc64le/alpine:3.12 - -LABEL maintainer="MinIO Inc " - -COPY --from=qemu /usr/bin/qemu-ppc64le-static /usr/bin - -RUN apk add --no-cache ca-certificates 'curl>7.61.0' && \ - curl -s -q https://dl.minio.io/client/mc/release/linux-ppc64le/mc -o /usr/bin/mc && \ - chmod +x /usr/bin/mc && \ - curl -s -q -O https://raw.githubusercontent.com/minio/minio/master/CREDITS - -ENTRYPOINT ["mc"] diff --git a/Dockerfile.release b/Dockerfile.release index b559f989..97285560 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -1,10 +1,17 @@ -FROM alpine:3.12 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 -MAINTAINER MinIO Inc +ARG TARGETARCH -RUN apk add --no-cache ca-certificates 'curl>7.61.0' && \ - curl -s -q https://dl.minio.io/client/mc/release/linux-amd64/mc -o /usr/bin/mc && \ - chmod +x /usr/bin/mc && \ - curl -s -q -O https://raw.githubusercontent.com/minio/minio/master/CREDITS +LABEL maintainer="MinIO Inc " + +COPY CREDITS /licenses/CREDITS +COPY LICENSE /licenses/LICENSE + +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 && \ + chmod +x /usr/bin/mc ENTRYPOINT ["mc"] diff --git a/Dockerfile.s390x.release b/Dockerfile.s390x.release deleted file mode 100644 index 435fdc85..00000000 --- a/Dockerfile.s390x.release +++ /dev/null @@ -1,13 +0,0 @@ -FROM multiarch/qemu-user-static:x86_64-s390x as qemu -FROM s390x/alpine:3.12 - -LABEL maintainer="MinIO Inc " - -COPY --from=qemu /usr/bin/qemu-s390x-static /usr/bin - -RUN apk add --no-cache ca-certificates 'curl>7.61.0' && \ - curl -s -q https://dl.minio.io/client/mc/release/linux-s390x/mc -o /usr/bin/mc && \ - chmod +x /usr/bin/mc && \ - curl -s -q -O https://raw.githubusercontent.com/minio/minio/master/CREDITS - -ENTRYPOINT ["mc"]