Skip to content

Instantly share code, notes, and snippets.

@dustyfresh
Created October 8, 2015 11:17
Show Gist options
  • Save dustyfresh/93ce88f0ddfc693e4aeb to your computer and use it in GitHub Desktop.
Save dustyfresh/93ce88f0ddfc693e4aeb to your computer and use it in GitHub Desktop.
Modified SpiderFoot Dockerfile for pulling latest spiderfoot version
#
# Spiderfoot Dockerfile
#
# http://www.spiderfoot.net
#
# Originally written by: Michael Pellon <m@pellon.io>
#
# https://github.com/smicallef/spiderfoot/blob/master/Dockerfile
#
# This Dockerfile has been updated to download the latest version
# of spiderfoot.
#
# Usage:
#
# sudo docker build -t spiderfoot .
# sudo docker run -it -p 8080:8080 spiderfoot
# Pull the base image.
FROM ubuntu:14.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-lxml \
swig \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& pip install cherrypy lxml mako M2Crypto 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
# Download the specified release.
WORKDIR /home
RUN 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
USER spiderfoot
WORKDIR /home/spiderfoot
EXPOSE 8080
# Run the application.
ENTRYPOINT ["/usr/bin/python"]
CMD ["sf.py", "0.0.0.0:8080"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment