forked from smicallef/spiderfoot
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.full
82 lines (65 loc) · 2.28 KB
/
Dockerfile.full
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# Spiderfoot Dockerfile (Full - includes all CLI tools, etc.)
#
# http://www.spiderfoot.net
#
# Written by: TheTechromancer
#
FROM python:3
# Install tools/dependencies from apt
RUN apt-get -y update && apt-get -y install nmap
# Compile other tools from source
# MassDNS
RUN mkdir /tools || true
WORKDIR /tools
RUN git clone --depth=1 https://github.com/blechschmidt/massdns.git \
&& cd massdns && make && make install && cd /tools && rm -r massdns
# Install Golang tools
RUN apt-get -y update && apt-get -y install golang
ENV GOPATH="/go"
ENV PATH="$GOPATH/bin:$PATH"
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin"
# ShuffleDNS
RUN GO111MODULE=on go get -v github.com/projectdiscovery/shuffledns/cmd/shuffledns
# Install Ruby tools
RUN apt-get -y update && apt-get -y install ruby ruby-dev bundler
# WhatWeb
RUN git clone https://github.com/urbanadventurer/WhatWeb \
&& gem install rchardet mongo json && cd /tools/WhatWeb \
&& bundle install && cd /tools
RUN groupadd spiderfoot \
&& useradd -m -g spiderfoot -d /home/spiderfoot -s /sbin/nologin \
-c "SpiderFoot User" spiderfoot
ENV SPIDERFOOT_LOGS /home/spiderfoot/log
ENV SPIDERFOOT_DATA /var/lib/spiderfoot
RUN mkdir -p "$SPIDERFOOT_LOGS" "$SPIDERFOOT_DATA" \
&& chown spiderfoot:spiderfoot "$SPIDERFOOT_LOGS" "$SPIDERFOOT_DATA"
WORKDIR /home/spiderfoot
COPY . .
ENV VIRTUAL_ENV=/opt/venv
RUN mkdir -p "$VIRTUAL_ENV" || true
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python -m venv "$VIRTUAL_ENV"
ARG REQUIREMENTS=requirements.txt
COPY "$REQUIREMENTS" requirements.txt
RUN chown -R spiderfoot:spiderfoot /tools
RUN chown -R spiderfoot:spiderfoot "$VIRTUAL_ENV"
RUN chown -R spiderfoot:spiderfoot "/home/spiderfoot"
USER spiderfoot
RUN pip install -U pip
RUN pip install -r "$REQUIREMENTS"
# Install Python tools
RUN pip install dnstwist
# CMSeeK
WORKDIR /tools
RUN git clone https://github.com/Tuhinshubhra/CMSeeK && cd CMSeeK \
&& pip install -r requirements.txt && mkdir Results
WORKDIR /home/spiderfoot
EXPOSE 5001
# Run the application
CMD python -c 'from spiderfoot import SpiderFootDb; \
db = SpiderFootDb({"__database": "spiderfoot.db"}, init=True); \
db.configSet({ \
"sfp_tool_cmseek:cmseekpath": "/tools/CMSeeK/cmseek.py", \
"sfp_tool_whatweb:whatweb_path": "/tools/WhatWeb/whatweb" \
})' || true && ./sf.py -l 0.0.0.0:5001