From f3d94ac721c9d9653a21f81c50d211a4a89ebb7b Mon Sep 17 00:00:00 2001 From: rtm516 Date: Fri, 12 Apr 2024 12:32:54 +0100 Subject: [PATCH] Fix docker user creation --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d98dbe1..6d515e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ FROM eclipse-temurin:17-alpine # Install curl for the healthcheck -RUN apk update && apk add curl +RUN apk update \ + && apk add curl \ + && adduser -h /opt/app -H -D app -RUN addgroup -S pingapi \ - && adduser -S pingapi -G pingapi \ - && chown -R pingapi:pingapi /opt/app -USER pingapi:pingapi +RUN mkdir -p /opt/app && \ + chown app:app /opt/app + +USER app:app WORKDIR /opt/app