Explorar o código

Modify the www-data user and group id to match the RUNTIME_UID/GID

Anil Kulkarni hai 1 ano
pai
achega
8d51ed2037
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Dockerfile

+ 4 - 0
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