The SDK split the HTTP server scaffolding into the new checker-sdk-go/checker/server subpackage. Update main.go to import server and call server.New, and isolate the interactive form code behind the standalone build tag so plugin/builtin builds skip net/http entirely.
14 lines
342 B
Docker
14 lines
342 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-tls .
|
|
|
|
FROM scratch
|
|
COPY --from=builder /checker-tls /checker-tls
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/checker-tls"]
|