diff --git a/build-bind.jenkins b/build-bind.jenkins index a96c2ec..801c517 100644 --- a/build-bind.jenkins +++ b/build-bind.jenkins @@ -25,6 +25,7 @@ pipeline { steps { script { workspace = pwd() + startFile = """ #! /usr/bin/env bash SIGN_DOMAINS="\$(ls -1 /var/named/masters)" sign-zone.sh @@ -32,7 +33,6 @@ chown -R bind:bind /var/named bind_exporter --bind.stats-url="http://127.0.0.1:8553" --web.listen-address=0.0.0.0:8053 & /usr/sbin/named -g -c /etc/bind/named.conf -u bind """ - writeFile(file: workspace + "/start.sh", text: startFile) signzoneFile = """ #! /usr/bin/env bash @@ -127,20 +127,30 @@ else SignZone "\${DOMAIN}" fi """ + writeFile(file: workspace + "/start.sh", text: startFile) writeFile(file: workspace + "/sign-zone.sh", text: signzoneFile) + writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getCurrentRootCA()) dockerFile = """ -FROM registry.hub.docker.com/internetsystemsconsortium/bind9:9.18 +FROM ${repository}/dockerhub/library/alpine:3.20 + +LABEL org.opencontainers.image.authors="The_Spider " +LABEL org.opencontainers.image.title="bind" +LABEL org.opencontainers.image.base.name="registry.hub.docker.com/internetsystemsconsortium/bind9" COPY *.sh /usr/local/bin/ +COPY test-chamber-13.lan.root.crt /usr/local/share/ca-certificates/ -RUN apt-get update && \ - apt-get install -y --no-install-recommends dnsutils && \ +RUN set -eux && \\ chmod +x /usr/local/bin/start.sh /usr/local/bin/sign-zone.sh + cat /usr/local/share/ca-certificates/test-chamber-13.lan.root.crt >> /etc/ssl/certs/ca-certificates.crt && \\ + sed -i 's/dl-cdn.alpinelinux.org/nexus.c.test-chamber-13.lan\\/repository/g' /etc/apk/repositories && \\ + apk add --no-cache ca-certificates bind-dnssec-tools && \\ + update-ca-certificates --fresh && \\ + apk --no-cache upgrade && \\ CMD [ "/bin/bash", "-c", "start.sh" ] """ - writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getCurrentRootCA()) } } }