11 lines
291 B
Docker
11 lines
291 B
Docker
FROM golang:1.24-alpine AS builder
|
|
WORKDIR /build
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN go build -buildvcs=false -o pvcollect .
|
|
|
|
FROM alpine:latest
|
|
COPY --from=builder /build/pvcollect /usr/bin/pvcollect
|
|
ENTRYPOINT ["/usr/bin/pvcollect", "-c", "/etc/pvcollect/config.json"]
|