mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 18:58:32 +02:00
CA certificates tasks in kaniko images (#2142)
* deploy: avoid duplicate certificates in images Signed-off-by: Konstantin Demin <rockdrilla@gmail.com> * deploy: use current stable Debian release image Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
This commit is contained in:
@@ -42,13 +42,8 @@ RUN \
|
||||
make GOARCH=$TARGETARCH out/warmer
|
||||
|
||||
# Generate latest ca-certificates
|
||||
|
||||
FROM debian:buster-slim AS certs
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y ca-certificates && \
|
||||
cat /etc/ssl/certs/* > /ca-certificates.crt
|
||||
FROM debian:bullseye-slim AS certs
|
||||
RUN apt update && apt install -y ca-certificates
|
||||
|
||||
FROM scratch
|
||||
COPY --from=0 /src/out/executor /kaniko/executor
|
||||
@@ -65,7 +60,7 @@ COPY --from=busybox:1.32.0 /*lib /lib
|
||||
# Declare /busybox as a volume to get it automatically in the path to ignore
|
||||
VOLUME /busybox
|
||||
|
||||
COPY --from=certs /ca-certificates.crt /kaniko/ssl/certs/
|
||||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /kaniko/ssl/certs/
|
||||
COPY --from=0 /kaniko/.docker /kaniko/.docker
|
||||
COPY files/nsswitch.conf /etc/nsswitch.conf
|
||||
ENV HOME /root
|
||||
|
||||
Reference in New Issue
Block a user