diff --git a/Dockerfile b/Dockerfile index ae5c3e5..a0bf705 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,33 @@ +FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as build-stage + +RUN \ + echo "**** install packages ****" && \ + apk add -U --update --no-cache --virtual=build-dependencies \ + autoconf \ + automake \ + build-base \ + git \ + glib-dev \ + libmaxminddb-dev \ + ncurses-dev && \ + mkdir -p /build && \ + mkdir -p /goaccess && \ + echo "**** build goaccess ****" && \ + git clone --shallow-submodules --recurse-submodules https://github.com/allinurl/goaccess.git /goaccess && cd /goaccess && \ + autoreconf -fiv && \ + ./configure --enable-utf8 --enable-geoip=mmdb && \ + make DESTDIR="/build" install && \ + echo "**** cleanup ****" && \ + apk del --purge \ + build-dependencies && \ + rm -rf \ + /goaccess/* \ + /tmp/* + FROM scratch LABEL maintainer="quietsy" # copy local files COPY root/ / +COPY --from=build-stage /build/ / diff --git a/root/dashboard/www/index.php b/root/dashboard/www/index.php index 19d2cb1..777ffda 100644 --- a/root/dashboard/www/index.php +++ b/root/dashboard/www/index.php @@ -174,7 +174,7 @@ } $geodb = file_exists('/config/geoip2db/GeoLite2-City.mmdb') ? '--geoip-database=/config/geoip2db/GeoLite2-City.mmdb' : ''; - $goaccess = shell_exec("goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb); + $goaccess = shell_exec("/usr/local/bin/goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb); $status = GetHeader() . GetProxies() . GetF2B() . GetAnnouncements() . GetLinks() . '