From c18b7dcdce25f780c06d3c0c67cc1f7009bce42d Mon Sep 17 00:00:00 2001 From: Peter Schiffer <3899107+pschiffe@users.noreply.github.com> Date: Sat, 23 Dec 2023 21:45:09 +0100 Subject: [PATCH] subvars has good packages now --- pdns-admin-base-ngoduykhanh/Dockerfile | 9 +++------ pdns-recursor/Dockerfile | 12 +++++------- pdns-recursor/Dockerfile.alpine | 12 +++++------- pdns/Dockerfile | 9 +++------ pdns/Dockerfile.alpine | 12 +++++------- 5 files changed, 21 insertions(+), 33 deletions(-) diff --git a/pdns-admin-base-ngoduykhanh/Dockerfile b/pdns-admin-base-ngoduykhanh/Dockerfile index d20939e..799c01d 100644 --- a/pdns-admin-base-ngoduykhanh/Dockerfile +++ b/pdns-admin-base-ngoduykhanh/Dockerfile @@ -1,6 +1,7 @@ FROM rockylinux/rockylinux:9-ubi -RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ +RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \ + && echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ && echo 'tsflags=nodocs' >> /etc/dnf/dnf.conf \ && echo 'assumeyes=True' >> /etc/dnf/dnf.conf \ && curl -fsSL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \ @@ -19,13 +20,9 @@ RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ python3-xmlsec \ uwsgi \ yarn \ + https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \ && dnf clean all -RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \ - && curl -fsSL https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \ - | tar -xzf - -C /usr/local/bin subvars \ - && chmod +x /usr/local/bin/subvars - RUN mkdir -p /opt/powerdns-admin \ && curl -fsSL https://github.com/PowerDNS-Admin/PowerDNS-Admin/archive/refs/tags/v0.4.1.tar.gz \ | tar -xzf - -C /opt/powerdns-admin --strip 1 \ diff --git a/pdns-recursor/Dockerfile b/pdns-recursor/Dockerfile index be281a4..1ec9ba8 100644 --- a/pdns-recursor/Dockerfile +++ b/pdns-recursor/Dockerfile @@ -1,17 +1,15 @@ FROM fedora:39 -RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ +RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \ + && echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ && echo 'assumeyes=True' >> /etc/dnf/dnf.conf \ && sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/fedora-cisco-openh264.repo \ && dnf --refresh upgrade \ - && dnf install pdns-recursor \ + && dnf install \ + pdns-recursor \ + https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \ && dnf clean all -RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \ - && curl -fsSL https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \ - | tar -xzf - -C /usr/local/bin subvars \ - && chmod +x /usr/local/bin/subvars - RUN mkdir -p /etc/pdns-recursor/api.d /run/pdns-recursor \ && chown -R pdns-recursor: /etc/pdns-recursor/api.d /run/pdns-recursor diff --git a/pdns-recursor/Dockerfile.alpine b/pdns-recursor/Dockerfile.alpine index f3bd3f8..2c437f5 100644 --- a/pdns-recursor/Dockerfile.alpine +++ b/pdns-recursor/Dockerfile.alpine @@ -1,14 +1,12 @@ FROM alpine:3.19.0 -RUN apk update \ +RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \ + && apk update \ && apk upgrade \ && apk add pdns-recursor \ - && rm -rf /var/cache/apk/* - -RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \ - && wget -qO- https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \ - | tar -xzf - -C /usr/local/bin subvars \ - && chmod +x /usr/local/bin/subvars + && wget -O subvars.apk https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.apk \ + && apk add --allow-untrusted subvars.apk \ + && rm -rf subvars.apk /var/cache/apk/* RUN mkdir -p /etc/pdns/api.d /var/run/pdns-recursor \ && chown -R recursor: /etc/pdns/api.d /var/run/pdns-recursor diff --git a/pdns/Dockerfile b/pdns/Dockerfile index 7a60716..045bf0a 100644 --- a/pdns/Dockerfile +++ b/pdns/Dockerfile @@ -1,6 +1,7 @@ FROM fedora:39 -RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ +RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \ + && echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ && echo 'assumeyes=True' >> /etc/dnf/dnf.conf \ && sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/fedora-cisco-openh264.repo \ && dnf --refresh upgrade \ @@ -8,14 +9,10 @@ RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \ hostname \ mariadb \ pdns \ + https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.rpm \ && dnf --setopt 'tsflags=' install pdns-backend-mysql \ && dnf clean all -RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \ - && curl -fsSL https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \ - | tar -xzf - -C /usr/local/bin subvars \ - && chmod +x /usr/local/bin/subvars - COPY pdns.conf.tpl docker-entrypoint.sh / ENV VERSION=4.8 \ diff --git a/pdns/Dockerfile.alpine b/pdns/Dockerfile.alpine index 1a38e23..cce7aeb 100644 --- a/pdns/Dockerfile.alpine +++ b/pdns/Dockerfile.alpine @@ -1,18 +1,16 @@ FROM alpine:3.19.0 -RUN apk update \ +RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'amd64') \ + && apk update \ && apk upgrade \ && apk add \ mariadb-client \ pdns \ pdns-backend-mysql \ pdns-doc \ - && rm -rf /var/cache/apk/* - -RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \ - && wget -qO- https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \ - | tar -xzf - -C /usr/local/bin subvars \ - && chmod +x /usr/local/bin/subvars + && wget -O subvars.apk https://github.com/kha7iq/subvars/releases/download/v0.1.5/subvars_${arch}.apk \ + && apk add --allow-untrusted subvars.apk \ + && rm -rf subvars.apk /var/cache/apk/* COPY pdns.conf.tpl docker-entrypoint.sh /