From 3975e8e1ef54b041053a918ccd7bda2f60c3f8e6 Mon Sep 17 00:00:00 2001 From: Sigurd Hansen <34724489+sighanse@users.noreply.github.com> Date: Wed, 4 Jan 2023 13:08:10 +0100 Subject: [PATCH 1/2] Add dedicated user --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 845ec7c..94e2d6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,9 @@ RUN install2.r --error --skipinstalled --ncpus -1 \ EXPOSE 3838 -RUN chown -R 1000:1000 /app/R && \ +RUN adduser --uid "1000" --disabled-password --no-create-home rapporteket && \ + chown -R 1000:1000 /app/R && \ chmod -R 755 /app/R +USER rapporteket CMD ["R", "-e", "options(shiny.port = 3838, shiny.host = \"0.0.0.0\"); rapadm::run_app()"] From 018cc0b50e5a2c0bcff4e481d9564ca381bc00e1 Mon Sep 17 00:00:00 2001 From: Sigurd Hansen <34724489+sighanse@users.noreply.github.com> Date: Wed, 4 Jan 2023 15:01:11 +0100 Subject: [PATCH 2/2] Create home dir --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 94e2d6b..81f9cdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN install2.r --error --skipinstalled --ncpus -1 \ EXPOSE 3838 -RUN adduser --uid "1000" --disabled-password --no-create-home rapporteket && \ +RUN adduser --uid "1000" --disabled-password rapporteket && \ chown -R 1000:1000 /app/R && \ chmod -R 755 /app/R USER rapporteket