tpotce/docker/tanner/snare/Dockerfile

37 lines
1,009 B
Text
Raw Normal View History

2018-05-26 23:09:31 +00:00
FROM alpine
2019-08-16 14:43:10 +00:00
#
2018-08-14 14:20:55 +00:00
# Include dist
ADD dist/ /root/dist/
2019-08-16 14:43:10 +00:00
#
2018-05-26 23:09:31 +00:00
# Setup apt
RUN apk -U --no-cache add \
build-base \
git \
linux-headers \
python3 \
python3-dev && \
2019-08-16 14:43:10 +00:00
#
2018-05-28 16:36:02 +00:00
# Setup Snare
git clone --depth=1 https://github.com/mushorg/snare /opt/snare && \
2018-05-26 23:09:31 +00:00
cd /opt/snare/ && \
pip3 install --no-cache-dir --upgrade pip setuptools && \
pip3 install --no-cache-dir -r requirements.txt && \
2018-08-02 22:17:03 +00:00
python3.6 setup.py install && \
cd / && \
rm -rf /opt/snare && \
clone --target http://example.com && \
2018-08-14 14:20:55 +00:00
mv /root/dist/pages/* /opt/snare/pages/ && \
2019-08-16 14:43:10 +00:00
#
2018-05-26 23:09:31 +00:00
# Clean up
apk del --purge \
build-base \
linux-headers \
python3-dev && \
rm -rf /root/* && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/cache/apk/*
2019-08-16 14:43:10 +00:00
#
2018-05-26 23:09:31 +00:00
# Start snare
2018-09-11 12:19:26 +00:00
STOPSIGNAL SIGKILL
2018-08-21 18:30:37 +00:00
CMD snare --tanner tanner --debug true --no-dorks true --auto-update false --host-ip 0.0.0.0 --port 80 --page-dir $(shuf -i 1-10 -n 1)