forked from smicallef/spiderfoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (50 loc) · 1.35 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
#
# Spiderfoot Dockerfile
#
# http://www.spiderfoot.net
#
# Written by: Michael Pellon <[email protected]>
#
# Usage:
#
# sudo docker build -t spiderfoot .
# sudo docker run -it -p 8080:8080 spiderfoot
# Pull the base image.
FROM ubuntu:16.04
# Install pre-requisites.
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libssl-dev \
libxml2-dev \
libxslt1-dev \
python-pip \
python-dev \
python-setuptools \
python-lxml \
python-m2crypto \
python-bs4 \
python-requests \
swig \
--no-install-recommends
RUN rm -rf /var/lib/apt/lists/* \
&& cd /usr/include/openssl/ \
&& ln -s ../x86_64-linux-gnu/openssl/opensslconf.h . \
&& pip install cherrypy lxml mako netaddr
# Create a dedicated/non-privileged user to run the app.
RUN addgroup spiderfoot && \
useradd -r -g spiderfoot -d /home/spiderfoot -s /sbin/nologin -c "SpiderFoot User" spiderfoot
ENV SPIDERFOOT_VERSION 2.9.0
# Download the specified release.
WORKDIR /home
RUN curl -sSL https://github.com/smicallef/spiderfoot/archive/v$SPIDERFOOT_VERSION-final.tar.gz \
| tar -v -C /home -xz \
&& mv /home/spiderfoot-$SPIDERFOOT_VERSION-final /home/spiderfoot \
&& chown -R spiderfoot:spiderfoot /home/spiderfoot
USER spiderfoot
WORKDIR /home/spiderfoot
EXPOSE 8080
# Run the application.
ENTRYPOINT ["/usr/bin/python"]
CMD ["sf.py", "0.0.0.0:8080"]