mirror of
https://github.com/pschiffe/docker-pdns.git
synced 2025-01-18 19:11:14 +01:00
Tidy up Dockerfiles
This commit is contained in:
parent
0a615b25ca
commit
15d3225d61
7 changed files with 51 additions and 47 deletions
|
@ -1,7 +1,10 @@
|
||||||
FROM fedora:38
|
FROM fedora:38
|
||||||
|
|
||||||
RUN curl -sSL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
||||||
&& dnf -y --setopt=install_weak_deps=False install \
|
&& echo 'assumeyes=True' >> /etc/dnf/dnf.conf \
|
||||||
|
&& curl -fsSL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
||||||
|
&& dnf --refresh upgrade \
|
||||||
|
&& dnf install \
|
||||||
nodejs-npm \
|
nodejs-npm \
|
||||||
python3-cffi \
|
python3-cffi \
|
||||||
python3-ldap \
|
python3-ldap \
|
||||||
|
@ -23,15 +26,17 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
||||||
&& chmod +x /usr/local/bin/subvars
|
&& chmod +x /usr/local/bin/subvars
|
||||||
|
|
||||||
RUN mkdir -p /opt/powerdns-admin \
|
RUN mkdir -p /opt/powerdns-admin \
|
||||||
&& curl -sSL https://github.com/PowerDNS-Admin/PowerDNS-Admin/archive/refs/tags/v0.4.1.tar.gz \
|
&& curl -fsSL https://github.com/PowerDNS-Admin/PowerDNS-Admin/archive/refs/tags/v0.4.1.tar.gz \
|
||||||
| tar -xzC /opt/powerdns-admin --strip 1 \
|
| tar -xzf - -C /opt/powerdns-admin --strip 1 \
|
||||||
&& sed -i '/cffi/d' /opt/powerdns-admin/requirements.txt \
|
&& sed -i \
|
||||||
&& sed -i '/lxml/d' /opt/powerdns-admin/requirements.txt \
|
-e '/cffi/d' \
|
||||||
&& sed -i '/mysqlclient/d' /opt/powerdns-admin/requirements.txt \
|
-e '/lxml/d' \
|
||||||
&& sed -i '/psycopg2/d' /opt/powerdns-admin/requirements.txt \
|
-e '/mysqlclient/d' \
|
||||||
&& sed -i '/python-ldap/d' /opt/powerdns-admin/requirements.txt \
|
-e '/psycopg2/d' \
|
||||||
&& sed -i '/python3-saml/d' /opt/powerdns-admin/requirements.txt \
|
-e '/python-ldap/d' \
|
||||||
&& sed -i '/PyYAML/d' /opt/powerdns-admin/requirements.txt \
|
-e '/python3-saml/d' \
|
||||||
|
-e '/PyYAML/d' \
|
||||||
|
/opt/powerdns-admin/requirements.txt \
|
||||||
&& chown -R root: /opt/powerdns-admin
|
&& chown -R root: /opt/powerdns-admin
|
||||||
|
|
||||||
WORKDIR /opt/powerdns-admin
|
WORKDIR /opt/powerdns-admin
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
FROM pschiffe/pdns-admin-base
|
FROM pschiffe/pdns-admin-base
|
||||||
|
|
||||||
RUN dnf -y --setopt=install_weak_deps=False install \
|
RUN dnf install nginx \
|
||||||
nginx \
|
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
COPY pdns-nginx.conf.tpl docker-entrypoint.sh /
|
COPY pdns-nginx.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
FROM pschiffe/pdns-admin-base
|
FROM pschiffe/pdns-admin-base
|
||||||
|
|
||||||
RUN dnf -y --setopt=install_weak_deps=False install \
|
RUN dnf install \
|
||||||
mariadb \
|
mariadb \
|
||||||
uwsgi-plugin-python3 \
|
uwsgi-plugin-python3 \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
EXPOSE 9494
|
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /
|
COPY docker-entrypoint.sh /
|
||||||
COPY pdns-admin.ini /etc/uwsgi.ini
|
COPY --chown=uwsgi:uwsgi pdns-admin.ini /etc/uwsgi.ini
|
||||||
RUN chown uwsgi: /etc/uwsgi.ini
|
|
||||||
|
EXPOSE 9494
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
FROM fedora:39
|
FROM fedora:39
|
||||||
|
|
||||||
RUN dnf -y --setopt=install_weak_deps=False install \
|
RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
||||||
pdns-recursor \
|
&& echo 'assumeyes=True' >> /etc/dnf/dnf.conf \
|
||||||
|
&& dnf --refresh upgrade \
|
||||||
|
&& dnf install pdns-recursor \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
||||||
|
@ -9,10 +11,10 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
||||||
| tar -xzf - -C /usr/local/bin subvars \
|
| tar -xzf - -C /usr/local/bin subvars \
|
||||||
&& chmod +x /usr/local/bin/subvars
|
&& chmod +x /usr/local/bin/subvars
|
||||||
|
|
||||||
RUN mkdir -p /etc/pdns-recursor/api.d \
|
RUN mkdir -p /etc/pdns-recursor/api.d /run/pdns-recursor \
|
||||||
&& chown -R pdns-recursor: /etc/pdns-recursor/api.d \
|
&& chown -R pdns-recursor: /etc/pdns-recursor/api.d /run/pdns-recursor
|
||||||
&& mkdir -p /run/pdns-recursor \
|
|
||||||
&& chown -R pdns-recursor: /run/pdns-recursor
|
COPY recursor.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
||||||
ENV VERSION=4.9 \
|
ENV VERSION=4.9 \
|
||||||
PDNS_setuid=pdns-recursor \
|
PDNS_setuid=pdns-recursor \
|
||||||
|
@ -21,9 +23,6 @@ ENV VERSION=4.9 \
|
||||||
|
|
||||||
EXPOSE 53 53/udp
|
EXPOSE 53 53/udp
|
||||||
|
|
||||||
COPY recursor.conf.tpl /
|
|
||||||
COPY docker-entrypoint.sh /
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
CMD [ "/usr/sbin/pdns_recursor" ]
|
CMD [ "/usr/sbin/pdns_recursor" ]
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
FROM alpine:3.19.0
|
FROM alpine:3.19.0
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk update \
|
||||||
pdns-recursor
|
&& apk upgrade \
|
||||||
|
&& apk add pdns-recursor \
|
||||||
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
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 \
|
&& wget -qO- https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \
|
||||||
| tar -xzf - -C /usr/local/bin subvars \
|
| tar -xzf - -C /usr/local/bin subvars \
|
||||||
&& chmod +x /usr/local/bin/subvars
|
&& chmod +x /usr/local/bin/subvars
|
||||||
|
|
||||||
RUN mkdir -p /etc/pdns/api.d \
|
RUN mkdir -p /etc/pdns/api.d /var/run/pdns-recursor \
|
||||||
&& chown -R recursor: /etc/pdns/api.d \
|
&& chown -R recursor: /etc/pdns/api.d /var/run/pdns-recursor
|
||||||
&& mkdir -p /var/run/pdns-recursor \
|
|
||||||
&& chown -R recursor: /var/run/pdns-recursor
|
COPY recursor.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
||||||
ENV VERSION=4.9 \
|
ENV VERSION=4.9 \
|
||||||
PDNS_setuid=recursor \
|
PDNS_setuid=recursor \
|
||||||
|
@ -20,9 +22,6 @@ ENV VERSION=4.9 \
|
||||||
|
|
||||||
EXPOSE 53 53/udp
|
EXPOSE 53 53/udp
|
||||||
|
|
||||||
COPY recursor.conf.tpl /
|
|
||||||
COPY docker-entrypoint.sh /
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
CMD [ "/usr/sbin/pdns_recursor" ]
|
CMD [ "/usr/sbin/pdns_recursor" ]
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
FROM fedora:39
|
FROM fedora:39
|
||||||
|
|
||||||
RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf \
|
RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
|
||||||
&& dnf -y --setopt=install_weak_deps=False install \
|
&& echo 'assumeyes=True' >> /etc/dnf/dnf.conf \
|
||||||
|
&& dnf --refresh upgrade \
|
||||||
|
&& dnf install \
|
||||||
hostname \
|
hostname \
|
||||||
mariadb \
|
mariadb \
|
||||||
pdns \
|
pdns \
|
||||||
pdns-backend-mysql \
|
&& dnf --setopt 'tsflags=' install pdns-backend-mysql \
|
||||||
&& dnf clean all
|
&& dnf clean all
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
||||||
|
@ -13,6 +15,8 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
||||||
| tar -xzf - -C /usr/local/bin subvars \
|
| tar -xzf - -C /usr/local/bin subvars \
|
||||||
&& chmod +x /usr/local/bin/subvars
|
&& chmod +x /usr/local/bin/subvars
|
||||||
|
|
||||||
|
COPY pdns.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
||||||
ENV VERSION=4.8 \
|
ENV VERSION=4.8 \
|
||||||
PDNS_guardian=yes \
|
PDNS_guardian=yes \
|
||||||
PDNS_setuid=pdns \
|
PDNS_setuid=pdns \
|
||||||
|
@ -21,9 +25,6 @@ ENV VERSION=4.8 \
|
||||||
|
|
||||||
EXPOSE 53 53/udp
|
EXPOSE 53 53/udp
|
||||||
|
|
||||||
COPY pdns.conf.tpl /
|
|
||||||
COPY docker-entrypoint.sh /
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
CMD [ "/usr/sbin/pdns_server" ]
|
CMD [ "/usr/sbin/pdns_server" ]
|
||||||
|
|
|
@ -1,16 +1,21 @@
|
||||||
FROM alpine:3.19.0
|
FROM alpine:3.19.0
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk update \
|
||||||
|
&& apk upgrade \
|
||||||
|
&& apk add \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
pdns \
|
pdns \
|
||||||
pdns-backend-mysql \
|
pdns-backend-mysql \
|
||||||
pdns-doc
|
pdns-doc \
|
||||||
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
|
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 \
|
&& wget -qO- https://github.com/kha7iq/subvars/releases/download/v0.1.4/subvars_Linux_${arch}.tar.gz \
|
||||||
| tar -xzf - -C /usr/local/bin subvars \
|
| tar -xzf - -C /usr/local/bin subvars \
|
||||||
&& chmod +x /usr/local/bin/subvars
|
&& chmod +x /usr/local/bin/subvars
|
||||||
|
|
||||||
|
COPY pdns.conf.tpl docker-entrypoint.sh /
|
||||||
|
|
||||||
ENV VERSION=4.8 \
|
ENV VERSION=4.8 \
|
||||||
PDNS_guardian=yes \
|
PDNS_guardian=yes \
|
||||||
PDNS_setuid=pdns \
|
PDNS_setuid=pdns \
|
||||||
|
@ -19,9 +24,6 @@ ENV VERSION=4.8 \
|
||||||
|
|
||||||
EXPOSE 53 53/udp
|
EXPOSE 53 53/udp
|
||||||
|
|
||||||
COPY pdns.conf.tpl /
|
|
||||||
COPY docker-entrypoint.sh /
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
CMD [ "/usr/sbin/pdns_server" ]
|
CMD [ "/usr/sbin/pdns_server" ]
|
||||||
|
|
Loading…
Reference in a new issue