ai/pp
1
0
Fork 0
pp/Dockerfile
2026-03-06 14:59:59 +03:00

24 lines
469 B
Docker

FROM golang:alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o /out/pp .
FROM alpine
RUN apk add --no-cache tzdata ca-certificates
WORKDIR /app
COPY --from=builder /out/pp /usr/local/bin/pp
EXPOSE 80
HEALTHCHECK --start-period=5s --start-interval=1s CMD \
test "$(wget -q -O - http://127.0.0.1/health)" = "ok"
ENTRYPOINT ["/usr/local/bin/pp"]