Skip to content

Commit 8aa4cdc

Browse files
authored
Change ownership to the librenms user
1 parent 4959802 commit 8aa4cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ RUN apk --update --no-cache add -t build-dependencies \
124124
&& echo "Installing LibreNMS https://github.com/librenms/librenms.git#${LIBRENMS_VERSION}..." \
125125
&& git clone --depth=1 --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git . \
126126
&& pip3 install --ignore-installed -r requirements.txt --upgrade --break-system-packages \
127-
&& COMPOSER_CACHE_DIR="/tmp" composer install --no-dev --no-interaction --no-ansi \
128127
&& mkdir config.d \
129128
&& cp config.php.default config.php \
130129
&& cp snmpd.conf.example /etc/snmp/snmpd.conf \
131130
&& sed -i '/runningUser/d' lnms \
132131
&& echo "foreach (glob(\"/data/config/*.php\") as \$filename) include \$filename;" >> config.php \
133132
&& echo "foreach (glob(\"${LIBRENMS_PATH}/config.d/*.php\") as \$filename) include \$filename;" >> config.php \
134-
&& chown -R nobody:nogroup ${LIBRENMS_PATH} \
133+
&& chown -R librenms:librenms ${LIBRENMS_PATH} \
134+
&& su librenms -s /bin/sh -c "COMPOSER_CACHE_DIR=/tmp composer install --no-dev --no-interaction --no-ansi" \
135135
&& apk del build-dependencies \
136136
&& rm -rf .git \
137137
html/plugins/Test \

0 commit comments

Comments
 (0)