forked from eclecticiq/OpenTAXII
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (32 loc) · 976 Bytes
/
Dockerfile
File metadata and controls
42 lines (32 loc) · 976 Bytes
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
# Set the base image to Python
FROM python:2.7.9
MAINTAINER EclecticIQ <opentaxii@eclecticiq.com>
# Create the working dir and set the working directory
WORKDIR /
# Install dependencies
COPY ./requirements.txt /requirements.txt
RUN pip install -r requirements.txt \
&& pip install supervisor \
&& pip install gunicorn \
&& pip install psycopg2 \
&& rm -f /requirements.txt
# Create directories
RUN mkdir /opentaxii \
&& mkdir /data \
&& mkdir /input
# Setup OpenTAXII
COPY ./ /opentaxii/
RUN cd /opentaxii \
&& python setup.py install \
&& rm -rf /opentaxii
# Setup default config
COPY opentaxii/defaults.yml /opentaxii.yml
# Volume for exposing data and possible input
VOLUME [ "/data", "/input" ]
# Setup the entrypoint
COPY docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
# Expose and Run using supervisor
COPY docker/supervisord.conf /supervisord.conf
EXPOSE 9000
CMD ["supervisord","-c","/supervisord.conf"]