mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -04:00
compile goaccess with qemu
This commit is contained in:
@@ -13,6 +13,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.3
|
- uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
|
- name: Set up qemu
|
||||||
|
run: |
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: |
|
run: |
|
||||||
docker build --no-cache -t ${{ github.sha }} .
|
docker build --no-cache -t ${{ github.sha }} .
|
||||||
|
|||||||
+61
-3
@@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as build-stage
|
FROM ghcr.io/linuxserver/baseimage-alpine:amd64-3.15 as build-stage-amd64
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install packages ****" && \
|
echo "**** install packages ****" && \
|
||||||
@@ -24,10 +24,68 @@ RUN \
|
|||||||
/goaccess/* \
|
/goaccess/* \
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
|
||||||
|
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 as build-stage-arm32v7
|
||||||
|
|
||||||
|
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 ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 as build-stage-arm64v8
|
||||||
|
|
||||||
|
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 as build-stage-consolidate
|
||||||
|
|
||||||
|
COPY --from=build-stage-amd64 /build/ /goaccess/x86_64/
|
||||||
|
COPY --from=build-stage-arm32v7 /build/ /goaccess/armv7l/
|
||||||
|
COPY --from=build-stage-arm64v8 /build/ /goaccess/aarch64/
|
||||||
|
COPY root/ /
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
LABEL maintainer="quietsy"
|
LABEL maintainer="quietsy"
|
||||||
|
|
||||||
# copy local files
|
# copy local files
|
||||||
COPY root/ /
|
COPY --from=build-stage-consolidate / /
|
||||||
COPY --from=build-stage /build/ /
|
|
||||||
|
|||||||
@@ -2,7 +2,16 @@
|
|||||||
|
|
||||||
echo "Applying the SWAG dashboard mod..."
|
echo "Applying the SWAG dashboard mod..."
|
||||||
|
|
||||||
apk add libmaxminddb
|
ARCH=$(uname -m)
|
||||||
|
if [ -d "/goaccess/${ARCH}" ]; then
|
||||||
|
echo "**** Installing/updating goaccess ****"
|
||||||
|
cp -a /goaccess/${ARCH}/* /
|
||||||
|
rm -rf /goaccess
|
||||||
|
else
|
||||||
|
echo "**** Goaccess already installed and up to date ****"
|
||||||
|
fi
|
||||||
|
|
||||||
|
apk add --no-cache libmaxminddb
|
||||||
cp -f /dashboard/dashboard.subdomain.conf.sample /config/nginx/proxy-confs/dashboard.subdomain.conf.sample
|
cp -f /dashboard/dashboard.subdomain.conf.sample /config/nginx/proxy-confs/dashboard.subdomain.conf.sample
|
||||||
if [ ! -f /config/nginx/proxy-confs/dashboard.subdomain.conf ]; then
|
if [ ! -f /config/nginx/proxy-confs/dashboard.subdomain.conf ]; then
|
||||||
cp /dashboard/dashboard.subdomain.conf.sample /config/nginx/proxy-confs/dashboard.subdomain.conf
|
cp /dashboard/dashboard.subdomain.conf.sample /config/nginx/proxy-confs/dashboard.subdomain.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user