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

pull/5100/head
Anil Kulkarni 2024-05-19 17:38:03 -07:00
rodzic 1f3243222b
commit 8d51ed2037
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4806669421E998D3
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -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