wip: helm

This commit is contained in:
cyrilix authored and Cyrille Nofficial committed 2022-09-12 16:34:34 +02:00
1 parent ebc15cb394
commit 5cab1cd96d
9 files changed
+296

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
# Build the manager binary
FROM docker.io/library/golang:1.19 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# Copy dependencies
COPY vendor/ vendor/
# Copy the go source
COPY cmd/ cmd/
COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 go build -a -v -tags netgo -o pod-cleaner ./cmd/pod-cleaner
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/pod-cleaner .
USER 65532:65532
ENTRYPOINT ["/pod-cleaner"]