bind switched to alpine
This commit is contained in:
parent
fa8a289f67
commit
c87a006218
@ -25,6 +25,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
workspace = pwd()
|
workspace = pwd()
|
||||||
|
|
||||||
startFile = """
|
startFile = """
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
SIGN_DOMAINS="\$(ls -1 /var/named/masters)" sign-zone.sh
|
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 &
|
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
|
/usr/sbin/named -g -c /etc/bind/named.conf -u bind
|
||||||
"""
|
"""
|
||||||
writeFile(file: workspace + "/start.sh", text: startFile)
|
|
||||||
|
|
||||||
signzoneFile = """
|
signzoneFile = """
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
@ -127,20 +127,30 @@ else
|
|||||||
SignZone "\${DOMAIN}"
|
SignZone "\${DOMAIN}"
|
||||||
fi
|
fi
|
||||||
"""
|
"""
|
||||||
|
writeFile(file: workspace + "/start.sh", text: startFile)
|
||||||
writeFile(file: workspace + "/sign-zone.sh", text: signzoneFile)
|
writeFile(file: workspace + "/sign-zone.sh", text: signzoneFile)
|
||||||
|
writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getCurrentRootCA())
|
||||||
|
|
||||||
dockerFile = """
|
dockerFile = """
|
||||||
FROM registry.hub.docker.com/internetsystemsconsortium/bind9:9.18
|
FROM ${repository}/dockerhub/library/alpine:3.20
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.authors="The_Spider <spider@smoothnet.org>"
|
||||||
|
LABEL org.opencontainers.image.title="bind"
|
||||||
|
LABEL org.opencontainers.image.base.name="registry.hub.docker.com/internetsystemsconsortium/bind9"
|
||||||
|
|
||||||
COPY *.sh /usr/local/bin/
|
COPY *.sh /usr/local/bin/
|
||||||
|
COPY test-chamber-13.lan.root.crt /usr/local/share/ca-certificates/
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN set -eux && \\
|
||||||
apt-get install -y --no-install-recommends dnsutils && \
|
|
||||||
chmod +x /usr/local/bin/start.sh /usr/local/bin/sign-zone.sh
|
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" ]
|
CMD [ "/bin/bash", "-c", "start.sh" ]
|
||||||
"""
|
"""
|
||||||
writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getCurrentRootCA())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user