diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..66034c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.11 +COPY . /root/ +WORKDIR /root/ +RUN pip install -r requirements.txt +ENTRYPOINT ["python", "cred_scanner.py"] diff --git a/README.md b/README.md index 9a66f33..9c19efa 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,19 @@ That will scan the local directory and all subdirectories. It will list the file false matches due to the nature of secret keys. --help Show this message and exit. -To run as a test in Jenkins just use the command line or add it as a step to your Jenkins build. Jenkins will automatically fail the build if it sees the exit code 1. \ No newline at end of file +To run as a test in Jenkins just use the command line or add it as a step to your Jenkins build. Jenkins will automatically fail the build if it sees the exit code 1. + + +## Docker Usage: + +* Build + +``` +docker build -t credscanner . +``` + +* Run: + +``` +docker run -v /home/user/development/git/somerepo:/mnt/ --rm -it credscanner --path /mnt/ +```