mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
chore: use new distroless base image provided by distroless org (#4219)
* chore: use new distroless base image provided by distroless org Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com> * chore: remove unnecessary user instruction Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com> Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
530e38a6f4
commit
9af9717f16
3 changed files with 3 additions and 12 deletions
|
@ -25,13 +25,10 @@ RUN --mount=type=bind,target=. \
|
|||
CGO_ENABLED=0 xx-go build -o /output/kyverno -ldflags="${LD_FLAGS}" -v ./cmd/cli/kubectl-kyverno/
|
||||
|
||||
# Packaging stage
|
||||
FROM scratch
|
||||
FROM ghcr.io/distroless/static:latest
|
||||
|
||||
LABEL maintainer="Kyverno"
|
||||
|
||||
COPY --from=builder /output/kyverno /
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
|
||||
USER 10001
|
||||
|
||||
ENTRYPOINT ["./kyverno"]
|
|
@ -25,13 +25,11 @@ RUN --mount=type=bind,target=. \
|
|||
CGO_ENABLED=0 xx-go build -o /output/kyvernopre -ldflags="${LD_FLAGS}" -v ./cmd/initContainer/
|
||||
|
||||
# Packaging stage
|
||||
FROM scratch
|
||||
FROM ghcr.io/distroless/static:latest
|
||||
|
||||
LABEL maintainer="Kyverno"
|
||||
|
||||
COPY --from=builder /output/kyvernopre /
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
|
||||
USER 10001
|
||||
|
||||
ENTRYPOINT ["./kyvernopre"]
|
||||
|
|
|
@ -29,13 +29,9 @@ RUN --mount=type=bind,target=. \
|
|||
CGO_ENABLED=0 xx-go build -o /output/kyverno -ldflags="${LD_FLAGS}" -v ./cmd/kyverno/
|
||||
|
||||
# Packaging stage
|
||||
FROM scratch
|
||||
FROM ghcr.io/distroless/static:latest
|
||||
|
||||
LABEL maintainer="Kyverno"
|
||||
COPY --from=builder /output/kyverno /
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
USER 10001
|
||||
|
||||
ENTRYPOINT ["./kyverno"]
|
||||
|
|
Loading…
Add table
Reference in a new issue