wip: helm

This commit is contained in:
2022-09-12 16:34:34 +02:00
committed by Cyrille Nofficial
parent ebc15cb394
commit 5cab1cd96d
9 changed files with 296 additions and 0 deletions

26
Dockerfile Normal file
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"]