From 8aa4cdcbb41ced7309138b137feca20da7663e41 Mon Sep 17 00:00:00 2001 From: Jason Berry <1776037+skyblaster@users.noreply.github.com> Date: Sat, 8 Nov 2025 17:59:02 -0800 Subject: [PATCH] Change ownership to the librenms user --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cac8e2e0..3ea18a77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -124,14 +124,14 @@ RUN apk --update --no-cache add -t build-dependencies \ && echo "Installing LibreNMS https://github.com/librenms/librenms.git#${LIBRENMS_VERSION}..." \ && git clone --depth=1 --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git . \ && pip3 install --ignore-installed -r requirements.txt --upgrade --break-system-packages \ - && COMPOSER_CACHE_DIR="/tmp" composer install --no-dev --no-interaction --no-ansi \ && mkdir config.d \ && cp config.php.default config.php \ && cp snmpd.conf.example /etc/snmp/snmpd.conf \ && sed -i '/runningUser/d' lnms \ && echo "foreach (glob(\"/data/config/*.php\") as \$filename) include \$filename;" >> config.php \ && echo "foreach (glob(\"${LIBRENMS_PATH}/config.d/*.php\") as \$filename) include \$filename;" >> config.php \ - && chown -R nobody:nogroup ${LIBRENMS_PATH} \ + && chown -R librenms:librenms ${LIBRENMS_PATH} \ + && su librenms -s /bin/sh -c "COMPOSER_CACHE_DIR=/tmp composer install --no-dev --no-interaction --no-ansi" \ && apk del build-dependencies \ && rm -rf .git \ html/plugins/Test \