From 8d51ed20373841bf277101e382fba61012b16b5a Mon Sep 17 00:00:00 2001 From: Anil Kulkarni Date: Sun, 19 May 2024 17:38:03 -0700 Subject: [PATCH] Modify the www-data user and group id to match the RUNTIME_UID/GID --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index a0eda3227..ff8c9e24b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,6 +132,10 @@ ENV DEBIAN_FRONTEND="noninteractive" # Ensure we run all scripts through 'bash' rather than 'sh' SHELL ["/bin/bash", "-c"] +# Set www-data to be RUNTIME_UID/RUNTIME_GID +RUN groupmod --gid ${RUNTIME_GID} www-data \ + && usermod --uid ${RUNTIME_UID} --gid ${RUNTIME_GID} www-data + RUN set -ex \ && mkdir -pv /var/www/ \ && chown -R ${RUNTIME_UID}:${RUNTIME_GID} /var/www