From b96da0b547616378bb698e27b09ee4d2e52e0687 Mon Sep 17 00:00:00 2001 From: Chris Blumentritt Date: Mon, 31 Dec 2018 14:53:27 -0600 Subject: [PATCH] Adding docker support --- .dockerignore | 4 ++++ Dockerfile | 6 ++++++ README.md | 17 +++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3214bce --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git/ +.vscode/ +*.txt +!/requirements.txt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ee118b9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.7-alpine +RUN /sbin/apk add tor +COPY . /opt/sherlock/ +RUN /usr/local/bin/pip install -r /opt/sherlock/requirements.txt + +ENTRYPOINT ["python", "/opt/sherlock/sherlock.py"] \ No newline at end of file diff --git a/README.md b/README.md index 4b53cd8..015ac2d 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,23 @@ optional arguments: For example, run ```python3 sherlock.py user123```, and all of the accounts found will be stored in a text file with the username (e.g ```user123.txt```). +## Docker Notes +If you have docker installed you can build an image and run this as a container. + +``` +docker build -t mysherlock-image . +``` + +Once the image is built sherlock can be invoked by running the following: + +``` +docker run --rm mysherlock-image user123 +``` + +The ```--rm``` flag is optional. It removes the container filesystem after running so you do not have a bunch of leftover container filesystem cruft. See https://docs.docker.com/engine/reference/run/#clean-up---rm + +One caveat is the text file that is created will only exist in the container so you will not be able to get at that. + ## License MIT License