docker-pdns/pdns-admin-uwsgi/Dockerfile

43 lines
1.2 KiB
Docker
Raw Normal View History

2018-11-07 22:27:04 +01:00
FROM fedora:29
2017-08-21 21:30:57 +02:00
RUN dnf -y --setopt=install_weak_deps=False install \
2017-08-21 21:30:57 +02:00
python-pip \
python2-mysql \
python-ldap \
mariadb \
uwsgi \
2018-11-07 22:27:04 +01:00
uwsgi-plugin-python2 \
2017-08-21 21:30:57 +02:00
&& dnf clean all
RUN mkdir -p /opt/powerdns-admin \
&& curl -sSL https://git.0x97.io/0x97/powerdns-admin/repository/master/archive.tar.gz \
2017-08-21 21:30:57 +02:00
| 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
WORKDIR /opt/powerdns-admin
2018-11-07 22:27:04 +01:00
RUN pip3 install --no-cache-dir envtpl \
&& pip install -r requirements.txt --no-cache-dir
2017-08-21 21:30:57 +02:00
ENV 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']"
EXPOSE 9494
VOLUME [ "/opt/powerdns-admin/upload" ]
COPY pdns-admin.ini /etc/uwsgi.d/
RUN chown uwsgi: /etc/uwsgi.d/pdns-admin.ini
COPY config.py.tpl /
COPY docker-cmd.sh /
CMD [ "/docker-cmd.sh" ]