Files
mtusi2026lab5/infra/minio/Dockerfile
T
2026-11-10 17:12:13 +03:00

41 lines
815 B
Docker

FROM golang:1.24.2-bookworm AS builder
ENV CGO_ENABLED=0
WORKDIR /src
RUN git clone --depth 1 \
--branch RELEASE.2025-04-22T22-12-26Z \
https://github.com/minio/minio.git /src/minio
WORKDIR /src/minio
RUN go build -trimpath -o /out/minio .
WORKDIR /src
RUN git clone --depth 1 \
--branch RELEASE.2025-04-16T18-13-26Z \
https://github.com/minio/mc.git /src/mc
WORKDIR /src/mc
RUN go build -trimpath -o /out/mc .
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /out/minio /usr/local/bin/minio
COPY --from=builder /out/mc /usr/local/bin/mc
RUN mkdir -p /data
EXPOSE 9000 9001
ENTRYPOINT ["minio"]
CMD ["server", "/data", "--console-address", ":9001"]