build(docker): add Containerfile
This commit is contained in:
parent
86bfdd5622
commit
9e168cb27c
13
Containerfile
Normal file
13
Containerfile
Normal 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"]
|
Loading…
Reference in New Issue
Block a user