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 d69bbde
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile-kaniko-pdns-builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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

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'

ENTRYPOINT ["/kaniko/executor"]
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,33 @@ For example, if the base image you use upgrades the compiler, the compiled outpu
will likely change.


## Custom Kaniko Image for PDNS Builder

https://hub.docker.com/repository/docker/powerdns/kaniko-pdns-builder/

A custom Kaniko image for PDNS Builder, because the official Kaniko debug image only offers Busybox and the PDNS Builder also needs Bash, Git, Perl, rsync and perhaps more.

### Building

- `docker build -f Dockerfile-kaniko-pdns-builder -t powerdns/kaniko-pdns-builder:1.0.0 .`

### Distributing

- `docker tag powerdns/kaniko-pdns-builder:1.0.0 powerdns/kaniko-pdns-builder:latest`
- `docker push powerdns/kaniko-pdns-builder:1.0.0`
- `docker push powerdns/kaniko-pdns-builder:latest`

### Running

- `docker run -it --entrypoint warmer powerdns/kaniko-pdns-builder:1.0.0 bash`
- `docker run -it powerdns/kaniko-pdns-builder:1.0.0`

### Resources

From:

- https://github.com/GoogleContainerTools/kaniko/blob/main/deploy/Dockerfile
- https://hub.docker.com/r/pernodricard/kaniko-alpine/dockerfile
- https://stackoverflow.com/a/69251129

- `curl --silent https://gcr.io/v2/kaniko-project/executor/tags/list | jq .`

0 comments on commit d69bbde

Please sign in to comment.