1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-01-23 02:14:48 +00:00

Merge pull request #530 from skyblaster/master

Change ownership of /opt/librenms and run composer as the librenms user
This commit is contained in:
Neil Lathwood 2025-11-19 17:29:41 +01:00 committed by GitHub
commit 9626a79b83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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