From 32ac53d24beb033bfee5e9078d4a289c5e23c6ba Mon Sep 17 00:00:00 2001 From: Farid AYOUJIL Date: Wed, 1 Jan 2020 20:02:45 +0000 Subject: [PATCH 1/4] Adding Dockerfile --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..68a2770 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python + +RUN pip3 install -r requirements.txt + +RUN chmod +x repator.py + +ENTRYPOINT ["repator.py"] From 2f41864329ce84b474629eb46858f1b3e8e7ed1f Mon Sep 17 00:00:00 2001 From: Farid AYOUJIL Date: Thu, 2 Jan 2020 10:37:19 +0000 Subject: [PATCH 2/4] Adding Dockerfile --- Dockerfile | 22 +++++++++++++++++++--- repator.py | 1 + requirements.txt | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68a2770..aa20614 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,23 @@ -FROM python +FROM fadawar/docker-pyqt5 + +RUN apt update +RUN apt install python3 python3-pip -y +RUN apt install libgl1-mesa-glx -y +RUN apt install git -y + +COPY . /repator +WORKDIR /repator RUN pip3 install -r requirements.txt -RUN chmod +x repator.py +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y locales \ + && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ + && dpkg-reconfigure --frontend=noninteractive locales \ + && update-locale LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 -ENTRYPOINT ["repator.py"] +RUN chown qtuser: . -R +RUN chmod +x /repator/repator.py +ENTRYPOINT ["/repator/repator.py"] diff --git a/repator.py b/repator.py index b5c4f1e..cda37fa 100755 --- a/repator.py +++ b/repator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # coding=utf-8 diff --git a/requirements.txt b/requirements.txt index 59b62d9..b51c2f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pyqt5>=5.7 +pyqt5>=5.9.0 -e git+https://github.com/lnv42/tinydb@master#egg=tinydb -e git+https://github.com/lnv42/python-docx@master#egg=python-docx fire From 91d9aa4ea49b2d08b710ca06450464cbd531fc34 Mon Sep 17 00:00:00 2001 From: Farid AYOUJIL Date: Thu, 2 Jan 2020 11:09:00 +0000 Subject: [PATCH 3/4] Add documentation/Docker --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e21d1cb..de60873 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Repator is a helper tool designed to automatize the process of report writing, initially for pentesters, but it was developped such that it will be easily customizable for different reporting usage. -## Install +## Normal install ### Repator git clone https://github.com/lnv42/repator @@ -23,3 +23,13 @@ or cd repator python3 repator.py + +## Docker install + +```bash +# To build the repator container +docker build . --tag repator + +# To run the repator +docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v /PATH/TO/YOUR/PROJECTS:/tmp/projects -e DISPLAY=$DISPLAY -u qtuser repator +``` From 2425ff6944f007acc44ada8f4d696fa20c9334d5 Mon Sep 17 00:00:00 2001 From: Farid AYOUJIL Date: Thu, 2 Jan 2020 11:11:51 +0000 Subject: [PATCH 4/4] Add documentation/Docker --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de60873..2538f32 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,12 @@ Repator is a helper tool designed to automatize the process of report writing, i cd repator pip3 install -r requirements.txt -## Update +### Update cd repator git pull pip3 install -r requirements.txt -## Start +### Start cd repator ./repator.py or