change owner id during startup

This commit is contained in:
Stefan Allius
2023-10-05 21:25:02 +02:00
parent 066459f14e
commit 1871f6c8d2
2 changed files with 10 additions and 10 deletions

View File

@@ -37,12 +37,6 @@ ENV SERVICE_NAME=$SERVICE_NAME
ENV UID=$UID
ENV GID=$GID
RUN addgroup --gid $GID $SERVICE_NAME && \
adduser --ingroup $SERVICE_NAME --shell /bin/false --disabled-password --uid $UID $SERVICE_NAME && \
mkdir -p /home/$SERVICE_NAME/log /home/$SERVICE_NAME/config && \
chown -R $SERVICE_NAME:$SERVICE_NAME /home/$SERVICE_NAME
# set the working directory in the container
WORKDIR /home/$SERVICE_NAME