Tidy up Dockerfiles

This commit is contained in:
Peter Schiffer 2023-12-19 22:20:10 +01:00
parent 0a615b25ca
commit 15d3225d61
No known key found for this signature in database
GPG key ID: F2A18AC34A008397
7 changed files with 51 additions and 47 deletions

View file

@ -1,7 +1,10 @@
FROM fedora:38
RUN curl -sSL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
&& dnf -y --setopt=install_weak_deps=False install \
RUN echo 'install_weak_deps=False' >> /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 \
&& dnf --refresh upgrade \
&& dnf install \
nodejs-npm \
python3-cffi \
python3-ldap \
@ -23,15 +26,17 @@ RUN arch=$([ "$(arch)" = 'aarch64' ] && echo -n 'arm64' || echo -n 'x86_64') \
&& chmod +x /usr/local/bin/subvars
RUN mkdir -p /opt/powerdns-admin \
&& curl -sSL https://github.com/PowerDNS-Admin/PowerDNS-Admin/archive/refs/tags/v0.4.1.tar.gz \
| tar -xzC /opt/powerdns-admin --strip 1 \
&& sed -i '/cffi/d' /opt/powerdns-admin/requirements.txt \
&& sed -i '/lxml/d' /opt/powerdns-admin/requirements.txt \
&& sed -i '/mysqlclient/d' /opt/powerdns-admin/requirements.txt \
&& sed -i '/psycopg2/d' /opt/powerdns-admin/requirements.txt \
&& sed -i '/python-ldap/d' /opt/powerdns-admin/requirements.txt \
&& sed -i '/python3-saml/d' /opt/powerdns-admin/requirements.txt \
&& sed -i '/PyYAML/d' /opt/powerdns-admin/requirements.txt \
&& 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 \
&& sed -i \
-e '/cffi/d' \
-e '/lxml/d' \
-e '/mysqlclient/d' \
-e '/psycopg2/d' \
-e '/python-ldap/d' \
-e '/python3-saml/d' \
-e '/PyYAML/d' \
/opt/powerdns-admin/requirements.txt \
&& chown -R root: /opt/powerdns-admin
WORKDIR /opt/powerdns-admin

View file

@ -1,7 +1,6 @@
FROM pschiffe/pdns-admin-base
RUN dnf -y --setopt=install_weak_deps=False install \
nginx \
RUN dnf install nginx \
&& dnf clean all
COPY pdns-nginx.conf.tpl docker-entrypoint.sh /

View file

@ -1,15 +1,14 @@
FROM pschiffe/pdns-admin-base
RUN dnf -y --setopt=install_weak_deps=False install \
RUN dnf install \
mariadb \
uwsgi-plugin-python3 \
&& dnf clean all
EXPOSE 9494
COPY docker-entrypoint.sh /
COPY pdns-admin.ini /etc/uwsgi.ini
RUN chown uwsgi: /etc/uwsgi.ini
COPY --chown=uwsgi:uwsgi pdns-admin.ini /etc/uwsgi.ini
EXPOSE 9494
ENTRYPOINT [ "/docker-entrypoint.sh" ]

View file

@ -1,7 +1,9 @@
FROM fedora:39
RUN dnf -y --setopt=install_weak_deps=False install \
pdns-recursor \
RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
&& echo 'assumeyes=True' >> /etc/dnf/dnf.conf \
&& dnf --refresh upgrade \
&& dnf install pdns-recursor \
&& dnf clean all
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 \
&& chmod +x /usr/local/bin/subvars
RUN mkdir -p /etc/pdns-recursor/api.d \
&& chown -R pdns-recursor: /etc/pdns-recursor/api.d \
&& mkdir -p /run/pdns-recursor \
&& chown -R pdns-recursor: /run/pdns-recursor
RUN mkdir -p /etc/pdns-recursor/api.d /run/pdns-recursor \
&& chown -R pdns-recursor: /etc/pdns-recursor/api.d /run/pdns-recursor
COPY recursor.conf.tpl docker-entrypoint.sh /
ENV VERSION=4.9 \
PDNS_setuid=pdns-recursor \
@ -21,9 +23,6 @@ ENV VERSION=4.9 \
EXPOSE 53 53/udp
COPY recursor.conf.tpl /
COPY docker-entrypoint.sh /
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "/usr/sbin/pdns_recursor" ]

View file

@ -1,17 +1,19 @@
FROM alpine:3.19.0
RUN apk add --no-cache \
pdns-recursor
RUN 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
RUN mkdir -p /etc/pdns/api.d \
&& chown -R recursor: /etc/pdns/api.d \
&& mkdir -p /var/run/pdns-recursor \
&& chown -R recursor: /var/run/pdns-recursor
RUN mkdir -p /etc/pdns/api.d /var/run/pdns-recursor \
&& chown -R recursor: /etc/pdns/api.d /var/run/pdns-recursor
COPY recursor.conf.tpl docker-entrypoint.sh /
ENV VERSION=4.9 \
PDNS_setuid=recursor \
@ -20,9 +22,6 @@ ENV VERSION=4.9 \
EXPOSE 53 53/udp
COPY recursor.conf.tpl /
COPY docker-entrypoint.sh /
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "/usr/sbin/pdns_recursor" ]

View file

@ -1,11 +1,13 @@
FROM fedora:39
RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf \
&& dnf -y --setopt=install_weak_deps=False install \
RUN echo 'install_weak_deps=False' >> /etc/dnf/dnf.conf \
&& echo 'assumeyes=True' >> /etc/dnf/dnf.conf \
&& dnf --refresh upgrade \
&& dnf install \
hostname \
mariadb \
pdns \
pdns-backend-mysql \
&& dnf --setopt 'tsflags=' install pdns-backend-mysql \
&& dnf clean all
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 \
&& chmod +x /usr/local/bin/subvars
COPY pdns.conf.tpl docker-entrypoint.sh /
ENV VERSION=4.8 \
PDNS_guardian=yes \
PDNS_setuid=pdns \
@ -21,9 +25,6 @@ ENV VERSION=4.8 \
EXPOSE 53 53/udp
COPY pdns.conf.tpl /
COPY docker-entrypoint.sh /
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "/usr/sbin/pdns_server" ]

View file

@ -1,16 +1,21 @@
FROM alpine:3.19.0
RUN apk add --no-cache \
RUN apk update \
&& apk upgrade \
&& apk add \
mariadb-client \
pdns \
pdns-backend-mysql \
pdns-doc
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
COPY pdns.conf.tpl docker-entrypoint.sh /
ENV VERSION=4.8 \
PDNS_guardian=yes \
PDNS_setuid=pdns \
@ -19,9 +24,6 @@ ENV VERSION=4.8 \
EXPOSE 53 53/udp
COPY pdns.conf.tpl /
COPY docker-entrypoint.sh /
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "/usr/sbin/pdns_server" ]