From b9ad296b036e9e771f50d9a12014dce51a914702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20H=C3=BCttemann?= Date: Thu, 21 Sep 2023 18:40:48 +0200 Subject: [PATCH] Add user and drop privileges --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35300df..cba46cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,13 +4,14 @@ COPY --from=koalaman/shellcheck:v0.9.0 /bin/shellcheck /bin/ RUN apk add --update --no-cache \ build-base \ gcc \ - ruby-full \ + ruby \ git \ openssh-keygen \ && \ - gem install mdl --no-document && \ - pip install pre-commit && \ + pip install --no-cache-dir pre-commit && \ + gem install --no-document mdl && \ mkdir /data && \ - git config --global --add safe.directory /data + adduser -D -g user user +USER user:user WORKDIR /data