Skip to content

Commit

Permalink
Add new Kaniko Dockerfile for PDNS builder.
Browse files Browse the repository at this point in the history
Put it besides `Dockerfile-kaniko` until it is clear that one can be
removed.
  • Loading branch information
aerique committed Aug 30, 2023
1 parent 169502b commit d24736c
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Dockerfile-kaniko-pdns-builder
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit d24736c

Please sign in to comment.