17 lines
515 B
Docker
17 lines
515 B
Docker
FROM golang:1.25-alpine AS builder
|
|
|
|
ARG CHECKER_VERSION=custom-build
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -tags standalone -ldflags "-X main.Version=${CHECKER_VERSION}" -o /checker-reverse-zone .
|
|
|
|
FROM scratch
|
|
COPY --from=builder /checker-reverse-zone /checker-reverse-zone
|
|
USER 65534:65534
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD ["/checker-reverse-zone", "-healthcheck"]
|
|
ENTRYPOINT ["/checker-reverse-zone"]
|