-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
42 lines (34 loc) · 1.23 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
FROM alpine:3.5
#File Author / Maintainer
MAINTAINER Troy Kelly
RUN apk update && \
apk add --no-cache git && \
apk add --update \
python \
python-dev \
py-pip \
libffi-dev \
openldap-dev \
build-base \
mariadb-dev && \
pip install -U pip && \
rm -rf /var/cache/apk/*
# Install Virtualenv
RUN pip install virtualenv
# Create a new directory where the virtual environment will be created and add the requirements file.
RUN git clone https://github.com/ngoduykhanh/PowerDNS-Admin.git /app
WORKDIR /app
RUN virtualenv flask && \
source ./flask/bin/activate && \
pip install MySQL-python && \
pip install -r requirements.txt && \
cp config_template.py config.py && \
sed -i "s|LOG_FILE = 'logfile.log'|LOG_FILE = ''|g" /app/config.py; \
sed -i "s|BASIC_ENABLED = True|BASIC_ENABLED = False|g" /app/config.py; \
sed -i "s|SIGNUP_ENABLED = True|SIGNUP_ENABLED = False|g" /app/config.py; \
sed -i "s|PDNS_VERSION = '3.4.7'|PDNS_VERSION = '4.0.4'|g" /app/config.py; \
sed -i "s|PRETTY_IPV6_PTR = False|PRETTY_IPV6_PTR = True|g" /app/config.py
EXPOSE 9393
COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
ENTRYPOINT ["docker-entrypoint.sh"]