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
2022-05-17 16:11:43 +01:00

46 lines
950 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 --depth 1
WORKDIR /goaccess
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" ]