mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-07 10:55:40 +00:00
New docker image based on Alpine Linux
This commit is contained in:
parent
71faaf4d17
commit
be4afd5ca6
42
docker/PowerDNS-Admin/Dockerfile
Normal file
42
docker/PowerDNS-Admin/Dockerfile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# PowerDNS-Admin
|
||||||
|
# Original from:
|
||||||
|
# https://github.com/ngoduykhanh/PowerDNS-Admin
|
||||||
|
#
|
||||||
|
# Initial image by winggundamth(/powerdns-mysql:trusty)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
FROM alpine
|
||||||
|
MAINTAINER Jeroen Boonstra <jeroen [at] provider.nl>
|
||||||
|
|
||||||
|
ENV APP_USER=web APP_NAME=powerdns-admin
|
||||||
|
ENV APP_PATH=/home/$APP_USER/$APP_NAME
|
||||||
|
|
||||||
|
|
||||||
|
RUN apk add --update \
|
||||||
|
sudo \
|
||||||
|
python \
|
||||||
|
libxml2 \
|
||||||
|
xmlsec \
|
||||||
|
git \
|
||||||
|
python-dev \
|
||||||
|
py-pip \
|
||||||
|
build-base \
|
||||||
|
libxml2-dev \
|
||||||
|
xmlsec-dev \
|
||||||
|
libffi-dev \
|
||||||
|
openldap-dev \
|
||||||
|
&& adduser -S web
|
||||||
|
|
||||||
|
RUN sudo -u $APP_USER -H git clone --depth=1 \
|
||||||
|
https://github.com/thomasDOTde/PowerDNS-Admin $APP_PATH
|
||||||
|
|
||||||
|
RUN pip install -r $APP_PATH/requirements.txt
|
||||||
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
|
|
||||||
|
|
||||||
|
USER $APP_USER
|
||||||
|
WORKDIR $APP_PATH
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
CMD ["python", "run.py"]
|
||||||
|
EXPOSE 9393
|
||||||
|
VOLUME ["/var/log"]
|
12
docker/PowerDNS-Admin/docker-entrypoint.sh
Executable file
12
docker/PowerDNS-Admin/docker-entrypoint.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$WAITFOR_DB" -a ! -f "$APP_PATH/config.py" ]; then
|
||||||
|
cp "$APP_PATH/config_template_docker.py" "$APP_PATH/config.py"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $APP_PATH && python create_db.py
|
||||||
|
|
||||||
|
# Start PowerDNS Admin
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue
Block a user