This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
goaccess-docker/Dockerfile
2023-03-22 00:54:30 +02:00

47 lines
1016 B
Docker

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" ]