From 5ef76eeff142d3a5f869bf067b2dbccb1ecd0a88 Mon Sep 17 00:00:00 2001 From: Jason Stewart Date: Thu, 18 Jan 2018 16:32:01 -0500 Subject: [PATCH] Add Docker build --- Dockerfile | 21 +++++++++++++++++++++ README.md | 7 +++++++ 2 files changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..10355cf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM debian:stretch-slim + +ENV DEBIAN_FRONTEND noninteractive + +RUN useradd -d /lynis-report-converter -U lynis + +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends \ + htmldoc libxml-writer-perl libarchive-zip-perl libjson-perl \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +COPY . /lynis-report-converter + +USER lynis + +WORKDIR /lynis-report-converter + +ENTRYPOINT ["/lynis-report-converter/lynis-report-converter.pl"] +CMD ["--help"] diff --git a/README.md b/README.md index 09f2a53..90b4e44 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,13 @@ Where: -o|--output Specifies the output file to print the report to. ``` +### Docker + +``` +docker build -t . +docker run --rm -v /local-report-dir:/reports lynis-report-converter -o /reports/report.html -i /reports/lynis-report.dat +``` + ### Output Features: * HTML (default) * Summarizes the lynis report into a single HTML file.