SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Docker: Ignore git, logs, docs, temp and build files (#1182)
bcoles8247c2d095e4
diff --git a/.dockerignore b/.dockerignoreindex 429b6c1a..546f942a 100644--- a/.dockerignore+++ b/.dockerignore@@ -1,5 +1,18 @@+.git/++build+dist+*.egg-info+*.egg/+*.pyc+*.swp+venv/cache/+log/spiderfoot.db*+spiderfoot.test.db-*.log+__pycache__+htmlcov/+docs/diff --git a/Dockerfile b/Dockerfileindex e0edbe14..4ef98513 100644--- a/Dockerfile+++ b/Dockerfile@@ -26,7 +26,11 @@## sudo docker run --rm spiderfoot sf.py -h#+# Running a shell in the container for maintenance+# sudo docker run -it --entrypoint /bin/sh spiderfoot+## Running spiderfoot unit tests in container+## sudo docker build -t spiderfoot-test --build-arg REQUIREMENTS=requirements_test.txt .# sudo docker run --rm spiderfoot-test -m pytest --flake8 .@@ -47,6 +51,8 @@ RUN pip3 install -r "$REQUIREMENTS"FROM alpine:3.12.4WORKDIR /home/spiderfoot+ENV SPIDERFOOT_LOGS /home/spiderfoot/log+# Place database and configs outside installation directoryENV SPIDERFOOT_DATA /var/lib/spiderfoot@@ -59,14 +65,11 @@ RUN apk --update --no-cache add python3 musl openssl libxslt tinyxml libxml2 jpe&& rm -rf /lib/apk/db \&& rm -rf /root/.cache \&& mkdir $SPIDERFOOT_DATA \+ && mkdir $SPIDERFOOT_LOGS \+ && chown spiderfoot:spiderfoot $SPIDERFOOT_LOGS \&& chown spiderfoot:spiderfoot $SPIDERFOOT_DATACOPY . .--# fix permissions on logs directory-ENV SPIDERFOOT_LOGS /home/spiderfoot/log-RUN chown spiderfoot:spiderfoot $SPIDERFOOT_LOGS-COPY --from=build /opt/venv /opt/venvENV PATH="/opt/venv/bin:$PATH"