1
0
Fork 0
mirror of https://github.com/librenms/docker.git synced 2026-08-03 15:23:37 +00:00

Fix build dependencies

This commit is contained in:
CrazyMax 2020-11-03 01:38:17 +01:00
parent 11d5a3acef
commit b410794a0a
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7

View file

@ -69,7 +69,7 @@ RUN apk --update --no-cache add \
util-linux \
whois \
&& apk --update --no-cache add -t build-dependencies \
gcc \
build-base \
make \
mariadb-dev \
musl-dev \
@ -96,7 +96,12 @@ RUN addgroup -g ${PGID} librenms \
&& chmod +x /usr/bin/distro
WORKDIR ${LIBRENMS_PATH}
RUN git clone --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git . \
RUN apk --update --no-cache add -t build-dependencies \
build-base \
linux-headers \
musl-dev \
python3-dev \
&& git clone --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git . \
&& pip3 install -r requirements.txt --upgrade \
&& COMPOSER_CACHE_DIR="/tmp" composer install --no-dev --no-interaction --no-ansi \
&& mkdir config.d \
@ -107,11 +112,13 @@ RUN git clone --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.
&& echo "foreach (glob(\"${LIBRENMS_PATH}/config.d/*.php\") as \$filename) include \$filename;" >> config.php \
&& git clone https://github.com/librenms-plugins/Weathermap.git ./html/plugins/Weathermap \
&& chown -R nobody.nogroup ${LIBRENMS_PATH} \
&& apk del build-dependencies \
&& rm -rf .git \
html/plugins/Test \
html/plugins/Weathermap/.git \
html/plugins/Weathermap/configs \
/tmp/*
/tmp/* \
/var/cache/apk/*
COPY rootfs /
RUN chmod a+x /usr/local/bin/*