From d61976016d53e5ae0abd9e32a1054318bbbeded8 Mon Sep 17 00:00:00 2001 From: Gavin Morris Date: Mon, 30 Oct 2023 13:54:09 -0400 Subject: [PATCH] Matomo upgrade 4151 (#284) * Matomo upgrade to version 4.14.2 and added geolocation database * Updated paths * Gunzip added to base image for download.sh * Removing the strip functions for gunzip * Working matomo image * Use download.sh for geoip database. * Revamped geoip download no hardcode values * Upgraded matomo and extra tools * Upgraded matomo and extra tools * Wrong SHA. Fixed * Extratools needs parity with matomo version, use 4.x with 4.x * Removed citylite db download in Dockerfile --------- Co-authored-by: Nigel Banks --- base/Dockerfile | 1 + base/rootfs/usr/local/bin/download.sh | 7 ++++++- matomo/Dockerfile | 10 +++++----- matomo/README.md | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/base/Dockerfile b/base/Dockerfile index 150d7c64..7aa0974b 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -29,6 +29,7 @@ RUN --mount=type=cache,id=base-apk-${TARGETARCH},sharing=locked,target=/var/cach curl \ git \ gnupg \ + gzip \ jq \ mariadb-client \ mysql-client \ diff --git a/base/rootfs/usr/local/bin/download.sh b/base/rootfs/usr/local/bin/download.sh index 829c0a8c..77bc1ed5 100755 --- a/base/rootfs/usr/local/bin/download.sh +++ b/base/rootfs/usr/local/bin/download.sh @@ -21,7 +21,7 @@ function usage { -u --url The url of the file to download. -c --sha256 The sha256 checksum to use to validate the download. -d --dest The location to unpack file into (optional). - -s --strip Exclude the root folder when unpacking (optional). + -s --strip Exclude the root folder when unpacking (optional, not supported with gzip or jar). -h --help Show this help. -x --debug Debug this script. @@ -107,10 +107,12 @@ function unpack { local file="${1}" local dest="${2}" local args=() + local filename= mkdir -p "${dest}" if [[ -v STRIP ]]; then args+=("--strip-components" "1") fi + filename=$(basename "${file}") case "${file}" in *.tar.xz | *.txz) tar -xf "${file}" -C "${dest}" "${args[@]}" @@ -118,6 +120,9 @@ function unpack { *.tar.gz | *.tgz) tar -xzf "${file}" -C "${dest}" "${args[@]}" ;; + *.gz | *.gzip) + gunzip "${file}" -f -c > "${dest}/${filename%.*}" + ;; *.zip | *.war) if [[ -v STRIP ]]; then mkdir -p /tmp/unpack diff --git a/matomo/Dockerfile b/matomo/Dockerfile index 5a442573..dc2f1104 100644 --- a/matomo/Dockerfile +++ b/matomo/Dockerfile @@ -3,15 +3,15 @@ FROM nginx ARG TARGETARCH -ARG MATOMO_VERSION=4.13.0 +ARG MATOMO_VERSION=4.15.1 ARG MATOMO_FILE=${MATOMO_VERSION}.tar.gz ARG MATOMO_URL=https://builds.matomo.org/matomo-${MATOMO_FILE} -ARG MATOMO_SHA256=59614fbfa870d354f8abc634cc21dbbebda2b9fde31592df8c813c39e1dff981 +ARG MATOMO_SHA256=5e77e2a6b18ba8542a3e4df481c0152dd059de960c49d04f7e789c9bb5753d27 -ARG EXTRA_TOOLS_VERSION=4.0.1-beta4 +ARG EXTRA_TOOLS_VERSION=4.1.0-beta5 ARG EXTRA_TOOLS_FILE=${EXTRA_TOOLS_VERSION}.tar.gz ARG EXTRA_TOOLS_URL=https://github.com/digitalist-se/extratools/archive/refs/tags/${EXTRA_TOOLS_FILE} -ARG EXTRA_TOOLS_SHA256=1d04ee7b871c76c9f875da100e20e9472059b2a4fe7c52830360e90f205779e2 +ARG EXTRA_TOOLS_SHA256=ce9c9f1d01aaf04e3dfded21d6b9080c1fda633535295dc1c8cd0427bcdc826f EXPOSE 8000 @@ -30,7 +30,7 @@ RUN --mount=type=cache,id=matomo-downloads-${TARGETARCH},sharing=locked,target=/ wget --directory-prefix=/var/www/matomo "https://raw.githubusercontent.com/matomo-org/matomo/${MATOMO_VERSION}/composer.json" && \ wget --directory-prefix=/var/www/matomo "https://raw.githubusercontent.com/matomo-org/matomo/${MATOMO_VERSION}/composer.lock" && \ composer require -d /var/www/matomo symfony/yaml:~2.6.0 && \ - composer require -d /var/www/matomo symfony/process:^3.4 && \ + composer require -d /var/www/matomo symfony/process:^5.4 && \ composer install -d /var/www/matomo && \ download.sh \ --url "${EXTRA_TOOLS_URL}" \ diff --git a/matomo/README.md b/matomo/README.md index 036d60ba..7d2be5c4 100644 --- a/matomo/README.md +++ b/matomo/README.md @@ -1,6 +1,6 @@ # Matomo -Docker image for [Matomo] version 4.13.0. +Docker image for [Matomo] version 4.15.1 Please refer to the [Matomo Documentation] for more in-depth information.