Files
zeekayandHanzo Dev 75bb7bf92e build: Go builder base to 1.26.5, GOTOOLCHAIN=auto
Currency bump. No go.mod directive changes.

The golang images ship GOTOOLCHAIN=local, so the moment a go.mod
directive moves past the image's Go version the build hard-fails
mid-stage. GOTOOLCHAIN=auto lets the toolchain resolve instead; the
pinned base stays the hermetic fast path.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-01 16:34:23 -07:00

25 lines
495 B
Docker

FROM golang:1.26.5-alpine AS build
ENV GOTOOLCHAIN=auto
LABEL maintainer="Hanzo AI, Inc. <[email protected]>"
ENV GOPATH /go
ENV CGO_ENABLED 0
RUN apk add -U --no-cache ca-certificates git
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -v -ldflags "-s -w" -o /go/bin/s3 .
FROM scratch
COPY --from=build /go/bin/s3 /usr/bin/s3
COPY --from=build /src/LICENSE /licenses/LICENSE
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["s3"]