2017-08-21 21:29:16 +02:00
|
|
|
FROM fedora:26
|
2016-09-02 22:48:20 +02:00
|
|
|
MAINTAINER "Peter Schiffer" <pschiffe@redhat.com>
|
|
|
|
|
|
|
|
RUN dnf -y --setopt=tsflags=nodocs install \
|
2017-08-21 21:29:16 +02:00
|
|
|
python-pip \
|
|
|
|
python2-mysql \
|
|
|
|
python-ldap \
|
|
|
|
mariadb \
|
|
|
|
nginx \
|
|
|
|
uwsgi \
|
|
|
|
uwsgi-plugin-python \
|
|
|
|
&& dnf clean all \
|
|
|
|
&& systemctl enable nginx \
|
|
|
|
&& systemctl enable uwsgi
|
2016-09-02 22:48:20 +02:00
|
|
|
|
|
|
|
RUN mkdir -p /opt/powerdns-admin \
|
2017-08-21 21:29:16 +02:00
|
|
|
&& curl -sSLk https://git.omicroninteractive.com/0x97/powerdns-admin/repository/archive.tar.gz?ref=master \
|
|
|
|
| tar -xzC /opt/powerdns-admin --strip 1 \
|
|
|
|
&& sed -i '/MySQL-python/d' /opt/powerdns-admin/requirements.txt \
|
|
|
|
&& sed -i '/python-ldap/d' /opt/powerdns-admin/requirements.txt \
|
|
|
|
&& chown -R root: /opt/powerdns-admin \
|
|
|
|
&& chown -R uwsgi: /opt/powerdns-admin/upload
|
2016-09-02 22:48:20 +02:00
|
|
|
|
|
|
|
WORKDIR /opt/powerdns-admin
|
|
|
|
|
|
|
|
RUN pip3 install envtpl \
|
2017-08-21 21:29:16 +02:00
|
|
|
&& pip install -r requirements.txt \
|
|
|
|
&& rm -rf ~/.cache/*
|
2016-09-02 22:48:20 +02:00
|
|
|
|
|
|
|
STOPSIGNAL SIGRTMIN+3
|
|
|
|
RUN echo 'ForwardToConsole=yes' >> /etc/systemd/journald.conf
|
|
|
|
|
|
|
|
ENV container=docker \
|
2017-08-21 21:29:16 +02:00
|
|
|
PDNS_ADMIN_LOGIN_TITLE="'PDNS'" \
|
|
|
|
PDNS_ADMIN_TIMEOUT=10 \
|
|
|
|
PDNS_ADMIN_LOG_LEVEL="'INFO'" \
|
|
|
|
PDNS_ADMIN_BASIC_ENABLED=True \
|
|
|
|
PDNS_ADMIN_SIGNUP_ENABLED=True \
|
|
|
|
PDNS_ADMIN_RECORDS_ALLOW_EDIT="['SOA', 'NS', 'A', 'AAAA', 'CNAME', 'MX', 'TXT', 'SRV']"
|
2016-09-02 22:48:20 +02:00
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
VOLUME [ "/opt/powerdns-admin/upload" ]
|
|
|
|
|
|
|
|
COPY pdns-admin.ini /etc/uwsgi.d/
|
|
|
|
RUN chown uwsgi: /etc/uwsgi.d/pdns-admin.ini
|
|
|
|
|
|
|
|
COPY pdns-nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY config.py.tpl /
|
|
|
|
COPY docker-cmd.sh /init
|
|
|
|
|
|
|
|
CMD [ "/init" ]
|