From d24736c0a377a437fd9f2bb4c42173fa5d08a958 Mon Sep 17 00:00:00 2001 From: Erik Winkels Date: Wed, 30 Aug 2023 15:57:38 +0200 Subject: [PATCH] Add new Kaniko Dockerfile for PDNS builder. Put it besides `Dockerfile-kaniko` until it is clear that one can be removed. --- Dockerfile-kaniko-pdns-builder | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Dockerfile-kaniko-pdns-builder diff --git a/Dockerfile-kaniko-pdns-builder b/Dockerfile-kaniko-pdns-builder new file mode 100644 index 0000000..fd9b524 --- /dev/null +++ b/Dockerfile-kaniko-pdns-builder @@ -0,0 +1,40 @@ +# From: +# - https://github.com/GoogleContainerTools/kaniko/blob/main/deploy/Dockerfile +# - https://hub.docker.com/r/pernodricard/kaniko-alpine/dockerfile +# - https://stackoverflow.com/a/69251129 +# +# - `docker build -f Dockerfile-kaniko-pdns-builder -t powerdns/kaniko-pdns-builder .` +# - `docker push powerdns/kaniko-pdns-builder:latest` + +# - `curl --silent https://gcr.io/v2/kaniko-project/executor/tags/list | jq .` + +# Kaniko v1.8.0+ has issues with mirror registries than contain a path (like +# OX's does). +#FROM gcr.io/kaniko-project/executor:debug AS kaniko +#FROM gcr.io/kaniko-project/executor:v1.7.0-debug AS kaniko +#FROM gcr.io/kaniko-project/executor:v1.8.1-debug AS kaniko +FROM gcr.io/kaniko-project/executor:v1.12.0-debug AS kaniko + +FROM alpine:3.11 + +RUN apk --no-cache add bash binutils coreutils git grep openssh-client perl rsync sed tree + +COPY --from=kaniko /kaniko /kaniko +COPY --from=kaniko /etc/nsswitch.conf /etc/nsswitch.conf +COPY --from=busybox:musl /bin /busybox + +# XXX needed? See: https://github.com/GoogleContainerTools/kaniko/blob/main/deploy/Dockerfile +# Declare /busybox as a volume to get it automatically in the path to ignore +#VOLUME /busybox + +ENV HOME /root +ENV USER root +ENV PATH $PATH:/kaniko:/busybox +ENV SSL_CERT_DIR /kaniko/ssl/certs +ENV DOCKER_CONFIG /kaniko/.docker/ +ENV DOCKER_CREDENTIAL_GCR_CONFIG /kaniko/.config/gcloud/docker_credential_gcr_config.json +ENV GOOGLE_APPLICATION_CREDENTIALS='/kaniko/.docker/config.json' + +#WORKDIR /workspace + +ENTRYPOINT ["/kaniko/executor"]