mirror of
https://github.com/hanzoai/volume.git
synced 2026-10-01 00:48:00 +00:00
One toolchain across the estate. The tree carried 1.26.0, .1, .3, .4 and .5 at once, so which compiler built a binary depended on which repo it came from. Co-authored-by: Hanzo Dev <[email protected]>
14 lines
297 B
Docker
14 lines
297 B
Docker
FROM golang:1.26.8-alpine AS builder
|
|
|
|
COPY main.go /main.go
|
|
COPY go.mod /go.mod
|
|
|
|
RUN cd / && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-extldflags -static -s -w" -o /manager && \
|
|
chmod 777 /manager
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /manager /manager
|
|
|
|
ENTRYPOINT [ "/manager" ]
|