-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (34 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# --- Build stage ---
FROM docker.io/golang:1.22 AS build-minio
ARG TARGETOS
ARG TARGETARCH
ARG MINIO_VERSION="RELEASE.2024-10-13T13-34-11Z"
WORKDIR /build
RUN git clone --single-branch --branch ${MINIO_VERSION} https://github.com/minio/minio.git /build
RUN make build
# --- Build stage ---
FROM docker.io/golang:1.22 AS build-mc
ARG TARGETOS
ARG TARGETARCH
ARG MC_VERSION="RELEASE.2024-10-08T09-37-26Z"
WORKDIR /build
RUN git clone --single-branch --branch ${MC_VERSION} https://github.com/minio/mc.git /build
RUN make build
# --- Final stage ---
FROM cgr.dev/chainguard/wolfi-base:latest
COPY --from=build-minio --chmod=755 /build/minio /usr/bin/minio
COPY --from=build-mc --chmod=755 /build/mc /usr/bin/mc
RUN set -ex ; \
mkdir -p /var/lib/minio ; \
chown nonroot:nonroot /var/lib/minio
USER nonroot
EXPOSE 9000/tcp
VOLUME [ "/var/lib/minio" ]
ENTRYPOINT [ "/usr/bin/minio" ]
CMD [ "server", "/var/lib/minio" ]
LABEL \
org.opencontainers.image.title="minio" \
org.opencontainers.image.source="https://github.com/f-bn/containers-images/minio" \
org.opencontainers.image.description="MinIO is a High Performance Object Storage, API compatible with Amazon S3 cloud storage service" \
org.opencontainers.image.licenses="AGPL-3.0-only" \
org.opencontainers.image.authors="Florian Bobin <[email protected]>"