From 66cc24abd13e08aa19264c65ae6e26bc90729d15 Mon Sep 17 00:00:00 2001 From: Jonas Chopin-Revel Date: Sat, 3 Dec 2022 09:52:58 +0100 Subject: [PATCH] Edit Dockerfile, two changes to reduce the image size and avoid to be as root in the container --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e787f2d..9250b43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ ENV MAX_FILE_UPLOADS=201 ENV PDF_STORAGE_PATH= RUN apt update && \ - apt install -y gettext-base librsvg2-bin pdftk imagemagick potrace + apt install -y gettext-base librsvg2-bin pdftk imagemagick potrace && \ + rm -rf /var/lib/apt/lists/* COPY . /usr/local/signaturepdf @@ -20,4 +21,6 @@ RUN chown -R www-data:www-data /usr/local/signaturepdf && chmod 750 -R /usr/loca WORKDIR /usr/local/signaturepdf +USER www-data + CMD /usr/local/signaturepdf/entrypoint.sh