Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Kaniko Dockerfile for PDNS builder #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions Dockerfile-kaniko

This file was deleted.

34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,37 @@ 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.

### Deprecation Warning

Eventually we want to get rid of Kaniko in our build systems, so do not depend too hard on this image.

### 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 .`
20 changes: 20 additions & 0 deletions docker/Dockerfile-kaniko-pdns-builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM gcr.io/kaniko-project/executor:v1.12.0-debug AS kaniko

# XXX 3.11 is EOL since 2021, update to 3.18
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"]
Loading