From d471d7fdf30cf3057ebbc868cb4d2fb32cf6b748 Mon Sep 17 00:00:00 2001 From: Peter Gallagher Date: Wed, 14 Aug 2019 16:50:29 +0100 Subject: [PATCH 1/2] Output files to host when using Docker Provides an example of how to create output files in the host filesystem when using Docker. --- Dockerfile.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile.md b/Dockerfile.md index 60b2b8d..250de94 100644 --- a/Dockerfile.md +++ b/Dockerfile.md @@ -11,7 +11,13 @@ You can also supply command line options like: ``docker run -t mytestssl -p --header example.com`` Please keep in mind that any output file (--log, --html, --json etc.) will be created -in the container. Also if you don't provide a user, this docker container uses a non-root user. +in the container. If you wish to have this created in your local directory you can mount a volume and change the output prefix e.g.: + +``` +docker run -t -v `pwd`:/data drwetter/testssl.sh --html --outprefix /data/ example.com +``` + +Also if you don't provide a user, this docker container uses a non-root user. You can also pull the image from dockerhub and run: From 860671ba7644e0514e66accbef587d1787516d1c Mon Sep 17 00:00:00 2001 From: Peter Gallagher Date: Thu, 29 Aug 2019 09:55:31 +0100 Subject: [PATCH 2/2] Style change when referencing current directory. --- Dockerfile.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.md b/Dockerfile.md index 250de94..f99a005 100644 --- a/Dockerfile.md +++ b/Dockerfile.md @@ -13,8 +13,8 @@ You can also supply command line options like: Please keep in mind that any output file (--log, --html, --json etc.) will be created in the container. If you wish to have this created in your local directory you can mount a volume and change the output prefix e.g.: -``` -docker run -t -v `pwd`:/data drwetter/testssl.sh --html --outprefix /data/ example.com +```bash +docker run -t -v ${PWD}:/data drwetter/testssl.sh --html --outprefix /data/ example.com ``` Also if you don't provide a user, this docker container uses a non-root user.