mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
spiderfoot, head bump to latest master
This commit is contained in:
parent
78d9d1f7c7
commit
bc6e94d329
3 changed files with 13 additions and 13 deletions
|
@ -1,33 +1,33 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
#
|
||||||
# Setup env and apt
|
# Setup env and apt
|
||||||
RUN apk -U add \
|
RUN apk -U add \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
nodejs \
|
nodejs \
|
||||||
nodejs-npm && \
|
nodejs-npm && \
|
||||||
|
#
|
||||||
# Get and install packages
|
# Get and install packages
|
||||||
mkdir -p /usr/src/app/ && \
|
mkdir -p /usr/src/app/ && \
|
||||||
cd /usr/src/app/ && \
|
cd /usr/src/app/ && \
|
||||||
git clone --depth=1 https://github.com/mobz/elasticsearch-head . && \
|
git clone --depth=1 https://github.com/mobz/elasticsearch-head . && \
|
||||||
npm install http-server && \
|
npm install http-server && \
|
||||||
sed -i "s#\"http\:\/\/localhost\:9200\"#window.location.protocol \+ \'\/\/\' \+ window.location.hostname \+ \'\:\' \+ window.location.port \+ \'\/es\/\'#" /usr/src/app/_site/app.js && \
|
sed -i "s#\"http\:\/\/localhost\:9200\"#window.location.protocol \+ \'\/\/\' \+ window.location.hostname \+ \'\:\' \+ window.location.port \+ \'\/es\/\'#" /usr/src/app/_site/app.js && \
|
||||||
|
#
|
||||||
# Setup user, groups and configs
|
# Setup user, groups and configs
|
||||||
addgroup -g 2000 head && \
|
addgroup -g 2000 head && \
|
||||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 head && \
|
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 head && \
|
||||||
chown -R head:head /usr/src/app/ && \
|
chown -R head:head /usr/src/app/ && \
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge git && \
|
apk del --purge git && \
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* && \
|
||||||
rm -rf /tmp/* && \
|
rm -rf /tmp/* && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
#
|
||||||
# Healthcheck
|
# Healthcheck
|
||||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
|
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9100'
|
||||||
|
#
|
||||||
# Start elasticsearch-head
|
# Start elasticsearch-head
|
||||||
USER head:head
|
USER head:head
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
|
@ -12,5 +12,5 @@ services:
|
||||||
# condition: service_healthy
|
# condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:64302:9100"
|
- "127.0.0.1:64302:9100"
|
||||||
image: "dtagdevsec/head:1811"
|
image: "dtagdevsec/head:1903"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
#
|
||||||
# Get and install dependencies & packages
|
# Get and install dependencies & packages
|
||||||
RUN sed -i 's/dl-cdn/dl-4/g' /etc/apk/repositories && \
|
RUN sed -i 's/dl-cdn/dl-4/g' /etc/apk/repositories && \
|
||||||
apk -U --no-cache add \
|
apk -U --no-cache add \
|
||||||
|
@ -17,11 +17,11 @@ RUN sed -i 's/dl-cdn/dl-4/g' /etc/apk/repositories && \
|
||||||
py-future \
|
py-future \
|
||||||
py-pip \
|
py-pip \
|
||||||
swig && \
|
swig && \
|
||||||
|
#
|
||||||
# Setup user
|
# Setup user
|
||||||
addgroup -g 2000 spiderfoot && \
|
addgroup -g 2000 spiderfoot && \
|
||||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 spiderfoot && \
|
adduser -S -s /bin/ash -u 2000 -D -g 2000 spiderfoot && \
|
||||||
|
#
|
||||||
# Install spiderfoot
|
# Install spiderfoot
|
||||||
# git clone --depth=1 https://github.com/smicallef/spiderfoot -b v2.12.0-final /home/spiderfoot && \
|
# git clone --depth=1 https://github.com/smicallef/spiderfoot -b v2.12.0-final /home/spiderfoot && \
|
||||||
git clone --depth=1 https://github.com/smicallef/spiderfoot /home/spiderfoot && \
|
git clone --depth=1 https://github.com/smicallef/spiderfoot /home/spiderfoot && \
|
||||||
|
@ -32,7 +32,7 @@ RUN sed -i 's/dl-cdn/dl-4/g' /etc/apk/repositories && \
|
||||||
chown -R spiderfoot:spiderfoot /home/spiderfoot && \
|
chown -R spiderfoot:spiderfoot /home/spiderfoot && \
|
||||||
sed -i "s#'__docroot': ''#'__docroot': '\/spiderfoot'#" /home/spiderfoot/sf.py && \
|
sed -i "s#'__docroot': ''#'__docroot': '\/spiderfoot'#" /home/spiderfoot/sf.py && \
|
||||||
sed -i 's#raise cherrypy.HTTPRedirect("\/")#raise cherrypy.HTTPRedirect("\/spiderfoot")#' /home/spiderfoot/sfwebui.py && \
|
sed -i 's#raise cherrypy.HTTPRedirect("\/")#raise cherrypy.HTTPRedirect("\/spiderfoot")#' /home/spiderfoot/sfwebui.py && \
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge build-base \
|
apk del --purge build-base \
|
||||||
git \
|
git \
|
||||||
|
@ -43,10 +43,10 @@ RUN sed -i 's/dl-cdn/dl-4/g' /etc/apk/repositories && \
|
||||||
py-pip \
|
py-pip \
|
||||||
py-setuptools && \
|
py-setuptools && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
#
|
||||||
# Healthcheck
|
# Healthcheck
|
||||||
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8080'
|
HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:8080'
|
||||||
|
#
|
||||||
# Set user, workdir and start spiderfoot
|
# Set user, workdir and start spiderfoot
|
||||||
USER spiderfoot:spiderfoot
|
USER spiderfoot:spiderfoot
|
||||||
WORKDIR /home/spiderfoot
|
WORKDIR /home/spiderfoot
|
||||||
|
|
Loading…
Reference in a new issue