mirror of
https://github.com/hanzoai/s3-cli.git
synced 2026-10-30 18:23:12 +00:00
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]>
25 lines
495 B
Docker
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"]
|