Dockerise: add Dockerfile, compose, gitignore token from config
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user