-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (32 loc) · 1.03 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
ARG BUILD_FROM
FROM $BUILD_FROM
# DNS Listener APKs
RUN apk add --no-cache python3 py3-pip py3-virtualenv
# OpenCanary APKs
RUN apk add --no-cache python3-dev bash gcc build-base libffi-dev openssl-dev
# Python Deps, per module (tmp)
COPY dns/requirements.txt /tmp/dns.requirements.txt
COPY opencanary/requirements.txt /tmp/oc.requirements.txt
COPY admin/requirements.txt /tmp/admin.requirements.txt
# Our App Root
RUN mkdir /app/
RUN mkdir /app/static
# App Dependencies
COPY opencanary/opencanary.conf /etc/opencanaryd/opencanary.conf
COPY admin/static/ /app/static/
COPY admin/templates/* /app/templates/
# My custom python apps...
COPY dns/listener.py /app/
COPY admin/web.py /app/
# Setup Python Env...
RUN virtualenv /env
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
RUN pip install --upgrade pip
RUN pip install --requirement /tmp/dns.requirements.txt
RUN pip install --requirement /tmp/oc.requirements.txt
RUN pip install --requirement /tmp/admin.requirements.txt
# And Finally...
COPY run.sh /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]