build(docker): add Containerfile

This commit is contained in:
Cyrille Nofficial 2022-10-13 14:20:55 +02:00
parent 86bfdd5622
commit 9e168cb27c

13
Containerfile Normal file
View File

@ -0,0 +1,13 @@
FROM docker.io/golang:1.19-alpine AS builder
WORKDIR /go/src
ADD . .
RUN CGO_ENABLED=0 go build -v -mod vendor -tags netgo ./cmd/pod-volume-cleaner
######
FROM gcr.io/distroless/static
USER 1234
COPY --from=builder /go/src/pod-volume-cleaner /go/bin/pod-volume-cleaner
ENTRYPOINT ["/go/bin/pod-volume-cleaner"]