FROM alpine AS build RUN apk add --no-cache \ autoconf \ automake \ build-base \ clang \ clang-static \ gettext-dev \ gettext-static \ git \ libmaxminddb-dev \ libmaxminddb-static \ libressl-dev \ linux-headers \ ncurses-dev \ ncurses-static \ tzdata RUN git clone https://github.com/allinurl/goaccess.git /goaccess WORKDIR /goaccess RUN git checkout $(git describe --tags `git rev-list --tags --max-count=1`) RUN autoreconf -fiv RUN CC="clang" CFLAGS="-O3 -static" LIBS="$(pkg-config --libs openssl)" ./configure --prefix="" --enable-utf8 --with-openssl --enable-geoip=mmdb RUN make && make DESTDIR=/dist install FROM alpine AS dist RUN apk add --update --no-cache \ nginx \ tini \ tzdata \ ncurses \ libintl \ libmaxminddb && \ rm -rf /var/cache/apk/* COPY --from=build /dist / ADD /root / RUN chmod +x /usr/local/bin/goaccess.sh EXPOSE 7889 VOLUME [ "/config", "/opt/log" ] CMD [ "sh", "/usr/local/bin/goaccess.sh" ]