-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathDockerfile
62 lines (50 loc) · 1.78 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:xenial
MAINTAINER Patrick Oberdorf <[email protected]>
ENV VERSION 43
COPY assets/apt/preferences.d/pdns /etc/apt/preferences.d/pdns
RUN apt-get update && apt-get install -y curl sudo \
&& curl https://repo.powerdns.com/FD380FBB-pub.asc | sudo apt-key add - \
&& echo "deb [arch=amd64] http://repo.powerdns.com/ubuntu xenial-auth-${VERSION} main" > /etc/apt/sources.list.d/pdns.list
RUN apt-get update && apt-get install -y \
wget \
netcat-openbsd \
git \
supervisor \
mysql-client \
nginx \
php7.0-fpm \
php7.0-mcrypt \
php7.0-mysqlnd \
pdns-server \
pdns-backend-mysql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
### PDNS ###
COPY assets/nginx/nginx.conf /etc/nginx/nginx.conf
COPY assets/nginx/vhost.conf /etc/nginx/sites-enabled/vhost.conf
COPY assets/nginx/fastcgi_params /etc/nginx/fastcgi_params
COPY assets/php/php.ini /etc/php/7.0/fpm/php.ini
COPY assets/php/php-cli.ini /etc/php/7.0/cli/php.ini
COPY assets/pdns/pdns.conf /etc/powerdns/pdns.conf
COPY assets/pdns/pdns.d/ /etc/powerdns/pdns.d/
COPY assets/mysql/pdns.sql /pdns.sql
### PHP/Nginx ###
RUN rm /etc/nginx/sites-enabled/default
RUN phpenmod mcrypt
RUN mkdir -p /run/php/
RUN mkdir -p /var/www/html/ \
&& cd /var/www/html \
&& rm -rf /var/www/html/* \
&& git clone https://github.com/poweradmin/poweradmin.git . \
&& git checkout b27f28b2d586afb201904437605be988ee048c22 \
&& rm -R /var/www/html/install
COPY assets/poweradmin/config.inc.php /var/www/html/inc/config.inc.php
COPY assets/mysql/poweradmin.sql /poweradmin.sql
RUN chown -R www-data:www-data /var/www/html/ \
&& chmod 644 /etc/powerdns/pdns.d/pdns.*
### SUPERVISOR ###
COPY assets/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start.sh /start.sh
EXPOSE 53 80
EXPOSE 53/udp
CMD ["/bin/bash", "/start.sh"]