12 lines
554 B
Docker
12 lines
554 B
Docker
FROM golang:1.24.3-alpine AS build
|
|
RUN apk add --no-cache git || apk add --no-cache git || apk add --no-cache git
|
|
RUN git clone --depth 1 --branch RELEASE.2025-04-22T22-12-26Z https://github.com/minio/minio.git /src
|
|
WORKDIR /src
|
|
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build \
|
|
for attempt in 1 2 3 4 5; do CGO_ENABLED=0 go build -trimpath -o /minio . && exit 0; done; exit 1
|
|
|
|
FROM alpine:3.22.1
|
|
RUN apk add --no-cache ca-certificates curl
|
|
COPY --from=build /minio /usr/local/bin/minio
|
|
ENTRYPOINT ["minio"]
|