From 9e168cb27cbad5afc54a241b8f3fee505ce4a620 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Thu, 13 Oct 2022 14:20:55 +0200 Subject: [PATCH] build(docker): add Containerfile --- Containerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..f49b54e --- /dev/null +++ b/Containerfile @@ -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"]