From 2422110d64c988985593316f9a04687a7f2f7d11 Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Mon, 11 Dec 2017 14:57:44 +0100 Subject: [PATCH] Simplify apk add commands, some clean ups --- ansible-playbook.yml | 2 +- pdns-admin-uwsgi/Dockerfile.alpine | 29 +++++++++++++---------------- pdns-recursor/Dockerfile | 2 +- pdns-recursor/Dockerfile.alpine | 11 +++++------ pdns/Dockerfile | 2 +- pdns/Dockerfile.alpine | 14 ++++++++------ 6 files changed, 29 insertions(+), 31 deletions(-) diff --git a/ansible-playbook.yml b/ansible-playbook.yml index 40a119c..2437c1b 100644 --- a/ansible-playbook.yml +++ b/ansible-playbook.yml @@ -153,7 +153,7 @@ - pdns-admin-upload:/opt/powerdns-admin/upload env: PDNS_ADMIN_SQLA_DB_PASSWORD: "'my-secret-pw'" - PDNS_ADMIN_PDNS_VERSION: "'4.0.4'" + PDNS_ADMIN_PDNS_VERSION: "'4.0'" PDNS_ADMIN_PDNS_API_KEY: "'secret'" tags: - pdns-admin diff --git a/pdns-admin-uwsgi/Dockerfile.alpine b/pdns-admin-uwsgi/Dockerfile.alpine index 0787ac5..13a24cf 100644 --- a/pdns-admin-uwsgi/Dockerfile.alpine +++ b/pdns-admin-uwsgi/Dockerfile.alpine @@ -1,19 +1,16 @@ FROM alpine:3.7 MAINTAINER "Peter Schiffer" -RUN set -xe \ - && apk update --no-cache && apk upgrade --no-cache \ - && apk add --update --no-cache \ - curl \ - py-pip \ - uwsgi-python \ - py-mysqldb \ - py-pyldap \ - py-cffi \ - py-bcrypt \ - mariadb-client \ - && rm -rf /var/cache/apk/* - +RUN apk add --no-cache \ + curl \ + py-pip \ + uwsgi-python \ + py-mysqldb \ + py-pyldap \ + py-cffi \ + py-bcrypt \ + mariadb-client + RUN mkdir -p /opt/powerdns-admin \ && curl -sSL https://git.0x97.io/0x97/powerdns-admin/repository/master/archive.tar.gz \ | tar -xzC /opt/powerdns-admin --strip 1 \ @@ -41,10 +38,10 @@ EXPOSE 9494 VOLUME [ "/opt/powerdns-admin/upload" ] COPY pdns-admin.ini /etc/uwsgi/conf.d/ -RUN chown uwsgi: /etc/uwsgi/conf.d/pdns-admin.ini && \ - ln -s /etc/uwsgi/uwsgi.ini /etc/uwsgi.ini +RUN chown uwsgi: /etc/uwsgi/conf.d/pdns-admin.ini \ + && ln -s /etc/uwsgi/uwsgi.ini /etc/uwsgi.ini COPY config.py.tpl / COPY docker-cmd.sh / -CMD [ "/docker-cmd.sh" ] \ No newline at end of file +CMD [ "/docker-cmd.sh" ] diff --git a/pdns-recursor/Dockerfile b/pdns-recursor/Dockerfile index 24ca1d9..e09ffa9 100644 --- a/pdns-recursor/Dockerfile +++ b/pdns-recursor/Dockerfile @@ -8,7 +8,7 @@ RUN dnf -y --setopt=install_weak_deps=False install \ RUN pip3 install envtpl \ && rm -rf ~/.cache/* -ENV VERSION=4.0.6 \ +ENV VERSION=4.0 \ PDNS_setuid=recursor \ PDNS_setgid=recursor \ PDNS_daemon=no diff --git a/pdns-recursor/Dockerfile.alpine b/pdns-recursor/Dockerfile.alpine index 083fefb..6cde23d 100644 --- a/pdns-recursor/Dockerfile.alpine +++ b/pdns-recursor/Dockerfile.alpine @@ -1,15 +1,14 @@ FROM alpine:3.7 MAINTAINER "Peter Schiffer" - -RUN set -xe \ - && apk update --no-cache && apk upgrade --no-cache \ - && apk add --update --no-cache pdns-recursor python3 \ - && rm -rf /var/cache/apk/* + +RUN apk add --no-cache \ + pdns-recursor \ + python3 RUN pip3 install envtpl \ && rm -rf ~/.cache/* -ENV VERSION=4.0.6 \ +ENV VERSION=4.0 \ PDNS_setuid=recursor \ PDNS_setgid=recursor \ PDNS_daemon=no diff --git a/pdns/Dockerfile b/pdns/Dockerfile index bc93f79..432fdc6 100644 --- a/pdns/Dockerfile +++ b/pdns/Dockerfile @@ -11,7 +11,7 @@ RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf \ RUN pip3 install envtpl \ && rm -rf ~/.cache/* -ENV VERSION=4.0.4 \ +ENV VERSION=4.0 \ PDNS_guardian=yes \ PDNS_setuid=pdns \ PDNS_setgid=pdns \ diff --git a/pdns/Dockerfile.alpine b/pdns/Dockerfile.alpine index 0400ff8..36ece0a 100644 --- a/pdns/Dockerfile.alpine +++ b/pdns/Dockerfile.alpine @@ -1,15 +1,17 @@ FROM alpine:3.7 MAINTAINER "Peter Schiffer" -RUN set -xe \ - && apk update --no-cache && apk upgrade --no-cache \ - && apk add --update --no-cache pdns pdns-backend-mysql pdns-doc python3 mariadb-client \ - && rm -rf /var/cache/apk/* - +RUN apk add --no-cache \ + pdns \ + pdns-backend-mysql \ + pdns-doc \ + python3 \ + mariadb-client + RUN pip3 install envtpl \ && rm -rf ~/.cache/* -ENV VERSION=4.0.4 \ +ENV VERSION=4.0 \ PDNS_guardian=yes \ PDNS_setuid=pdns \ PDNS_setgid=pdns \