Files
s3/Dockerfile
zeekay 7953d43de2 refactor: consolidate Dockerfiles into single production Dockerfile
Replaced 7 Dockerfiles with one. Dockerfile.hanzo (our from-source
production build using golang:1.26-bookworm) becomes the canonical
Dockerfile. Deleted upstream MinIO cruft: Dockerfile.cicd (minio/minio:edge
wrapper), Dockerfile.hotfix and Dockerfile.release (download pre-built
binaries from dl.min.io), Dockerfile.release.old_cpu (Go 1.24, stale),
Dockerfile.scratch (bare binary copy).

Updated publish.yml to reference Dockerfile instead of Dockerfile.hanzo.
Removed docker-hotfix Makefile targets that referenced deleted files.
2026-03-24 20:50:15 -07:00

30 lines
663 B
Docker

FROM golang:1.26-bookworm AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG TARGETARCH
ARG VERSION=""
ARG COMMIT_ID=""
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -tags kqueue -trimpath \
-ldflags "-s -w \
-X github.com/hanzoai/s3/cmd.Version=${VERSION} \
-X github.com/hanzoai/s3/cmd.CopyrightYear=2026 \
-X github.com/hanzoai/s3/cmd.CommitID=${COMMIT_ID}" \
-o /s3 .
FROM alpine:latest
RUN apk add --no-cache curl ca-certificates
COPY --from=build /s3 /usr/bin/minio
VOLUME ["/data"]
EXPOSE 9000 9001
ENTRYPOINT ["/usr/bin/minio"]
CMD ["server", "/data", "--console-address", ":9001"]