From a6abc7fd5db211f54eb051508f9329f70f9af843 Mon Sep 17 00:00:00 2001 From: Jonathan Senecal Date: Fri, 21 Sep 2018 16:26:27 -0400 Subject: [PATCH] Fixes for `validate.php` nologin errors and missing setfacl binaries ``` [FAIL] fping could not be executed. fping must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required. () [FAIL] fping6 could not be executed. fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exlusions may be required. () nologin: unrecognized option: c Try 'nologin --help' for more information. ``` --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b13076e..e3987e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ LABEL maintainer="CrazyMax" \ org.label-schema.schema-version="1.0" RUN apk --update --no-cache add \ + acl \ bash \ binutils \ ca-certificates \ @@ -79,12 +80,13 @@ ENV LIBRENMS_VERSION="1.43" \ RUN mkdir -p /opt \ && addgroup -g 1000 librenms \ - && adduser -u 1000 -G librenms -h ${LIBRENMS_PATH} -s /sbin/nologin -D librenms \ + && adduser -u 1000 -G librenms -h ${LIBRENMS_PATH} -s /bin/sh -D librenms \ + && passwd -l librenms \ && usermod -a -G librenms nginx \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \ && git clone --branch ${LIBRENMS_VERSION} https://github.com/librenms/librenms.git ${LIBRENMS_PATH} \ && chown -R librenms. ${LIBRENMS_PATH} \ - && su - librenms -s /bin/sh -c "composer install --no-dev --no-interaction --no-ansi --working-dir=${LIBRENMS_PATH}" \ + && su - librenms -c "composer install --no-dev --no-interaction --no-ansi --working-dir=${LIBRENMS_PATH}" \ && wget -q https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro -O /usr/bin/distro \ && chmod +x /usr/bin/distro \ && rm -rf /tmp/*