mirror of
https://github.com/hanzoai/simple-coredns-manager.git
synced 2026-10-30 19:55:29 +00:00
go.mod declares `go 1.26.5` while the builder pinned a much older golang image.
The golang images set GOTOOLCHAIN=local, so the base can never fetch a newer
toolchain and the build dies at once:
go: go.mod requires go >= 1.26.5 (running go 1.x; GOTOOLCHAIN=local)
1.26.5 is also the current release — go.dev lists it as the newest stable, and
golang:latest and golang:1.26.5 are the same image (sha256:3aff6657219a4d9).
Image variant preserved; the target tag was verified to exist before the change.
Co-authored-by: Hanzo Dev <[email protected]>
23 lines
406 B
Docker
23 lines
406 B
Docker
FROM golang:1.26.5-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /coredns-manager .
|
|
|
|
FROM alpine:3.21
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
COPY --from=builder /coredns-manager /usr/local/bin/coredns-manager
|
|
COPY templates/ /app/templates/
|
|
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["coredns-manager"]
|