forked from smicallef/spiderfoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (41 loc) · 1.5 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
#
# Spiderfoot Dockerfile
#
# http://www.spiderfoot.net
#
# Written by: Michael Pellon <m@pellon.io>
# Updated by: Chandrapal <bnchandrapal@protonmail.com>
# Updated by: Steve Micallef <steve@binarypool.com>
# -> Inspired by https://github.com/combro2k/dockerfiles/tree/master/alpine-spiderfoot
#
# Usage:
#
# sudo docker build -t spiderfoot .
# sudo docker run -it -p 5001:5001 spiderfoot
# Pull the base image.
FROM alpine:latest
COPY requirements.txt .
# Run everything as one command so that only one layer is created
RUN apk --update add --no-cache --virtual build-dependencies gcc git curl py2-pip swig \
tinyxml-dev python2-dev musl-dev openssl-dev libffi-dev libxslt-dev \
&& apk --update --no-cache add python2 musl openssl libxslt tinyxml \
&& pip --no-cache-dir install wheel \
&& pip --no-cache-dir install -r requirements.txt \
&& addgroup spiderfoot \
&& adduser -G spiderfoot -h /home/spiderfoot -s /sbin/nologin \
-g "SpiderFoot User" -D spiderfoot \
&& rmdir /home/spiderfoot \
&& cd /home \
&& curl -sSL https://github.com/smicallef/spiderfoot/archive/master.tar.gz \
| tar -v -C /home -xz \
&& mv /home/spiderfoot-master /home/spiderfoot \
&& chown -R spiderfoot:spiderfoot /home/spiderfoot \
&& apk del --purge build-dependencies \
&& rm -rf /var/cache/apk/* \
&& rm -rf /root/.cache
USER spiderfoot
WORKDIR /home/spiderfoot
EXPOSE 5001
# Run the application.
ENTRYPOINT ["/usr/bin/python"]
CMD ["./sf.py", "0.0.0.0:5001"]