Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bitnami/matomo/5/debian-12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
ARG TARGETARCH

LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2026-06-01T13:20:16Z" \
org.opencontainers.image.created="2026-06-05T18:51:09Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/matomo/README.md" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/matomo" \
Expand All @@ -28,13 +28,13 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \
mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \
COMPONENTS=( \
"render-template-1.0.9-165-linux-${OS_ARCH}-debian-12" \
"render-template-1.0.9-166-linux-${OS_ARCH}-debian-12" \
"php-8.4.21-5-linux-${OS_ARCH}-debian-12" \
"apache-2.4.67-1-linux-${OS_ARCH}-debian-12" \
"mysql-client-12.3.2-0-linux-${OS_ARCH}-debian-12" \
"postgresql-lib-18.4.0-0-linux-${OS_ARCH}-debian-12" \
"libphp-8.4.21-0-linux-${OS_ARCH}-debian-12" \
"ini-file-1.4.9-10-linux-${OS_ARCH}-debian-12" \
"ini-file-1.4.9-11-linux-${OS_ARCH}-debian-12" \
"matomo-5.10.1-0-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \
Expand Down Expand Up @@ -62,8 +62,8 @@ ENV APACHE_HTTPS_PORT_NUMBER="" \
APACHE_HTTP_PORT_NUMBER="" \
APP_VERSION="5.10.1" \
BITNAMI_APP_NAME="matomo" \
IMAGE_REVISION="1" \
LD_LIBRARY_PATH="/opt/bitnami/postgresql/lib:$LD_LIBRARY_PATH" \
IMAGE_REVISION="2" \
LD_LIBRARY_PATH="/opt/bitnami/postgresql/lib" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/apache/bin:/opt/bitnami/mysql/bin:$PATH"

EXPOSE 8080 8443
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4134a42e91271bd0a48f2d6d172910afdfbcaf5251bb8c8bd49e9700aa66d99f ini-file-1.4.9-11-linux-amd64-debian-12.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
caafc64b69e970f938d535c3aaf7e66420e0dba2c5cbd332e55ccdfd926eed66 ini-file-1.4.9-11-linux-arm64-debian-12.tar.gz

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e2467be27e79a387c78b8ef3a57ceaa07bea65009972571f20dcf58631656e0b render-template-1.0.9-166-linux-amd64-debian-12.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2c7634c5c0882d2dbd822744f6b5bdb074a07a1abf710c67e1206f1c20b8afa render-template-1.0.9-166-linux-arm64-debian-12.tar.gz
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ ensure_user_exists() {
if [[ -n "$home" ]]; then
mkdir -p "$home"
usermod -d "$home" "$user" >/dev/null 2>&1
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group"
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group" -n
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#########################
is_int() {
local -r int="${1:?missing value}"
if [[ "$int" =~ ^-?[0-9]+ ]]; then
if [[ "$int" =~ ^-?[0-9]+$ ]]; then
true
else
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,36 @@ get_sematic_version () {
fi
fi
}

########################
# Compares two semantic versions
# Arguments:
# $1 - version1: first version to compare
# $2 - version2: second version to compare
# Returns:
# -1 if version1 is less than version2
# 0 if version1 is equal to version2
# 1 if version1 is greater than version2
#########################
compare_semantic_versions() {
local version1="${1:?version1 is required}"
local version2="${2:?version2 is required}"
local major1 major2 minor1 minor2 patch1 patch2

major1="$(get_sematic_version "$version1" 1)"
major2="$(get_sematic_version "$version2" 1)"
minor1="$(get_sematic_version "$version1" 2)"
minor2="$(get_sematic_version "$version2" 2)"
patch1="$(get_sematic_version "$version1" 3)"
patch2="$(get_sematic_version "$version2" 3)"

if [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -eq "$minor2" ]] && [[ "$patch1" -eq "$patch2" ]]; then
echo "0"
elif [[ "$major1" -lt "$major2" ]] ||
{ [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -lt "$minor2" ]]; } ||
{ [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -eq "$minor2" ]] && [[ "$patch1" -lt "$patch2" ]]; }; then
echo "-1"
else
echo "1"
fi
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SSLSessionCacheTimeout 300
SSLCertificateKeyFile "{{APACHE_CONF_DIR}}/bitnami/certs/tls.key"

<Directory "{{APACHE_BASE_DIR}}/htdocs">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SetEnvIf X-Forwarded-Proto https HTTPS=on
<VirtualHost _default_:80>
DocumentRoot "{{APACHE_BASE_DIR}}/htdocs"
<Directory "{{APACHE_BASE_DIR}}/htdocs">
Options Indexes FollowSymLinks
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ matomo_pass_wizard() {
wizard_url="http://127.0.0.1:${port}/"
cookie_file="/tmp/cookie$(generate_random_string -t alphanumeric -c 8)"
curl_opts=("--location" "--silent" "--cookie" "$cookie_file" "--cookie-jar" "$cookie_file")
# Disable remote access during wizard setup
for vhost in "matomo-vhost.conf" "matomo-https-vhost.conf"; do
replace_in_file "/opt/bitnami/apache/conf/vhosts/$vhost" "Require all granted" "Require local"
done
# Ensure the web server is started
web_server_start
info "Passing Matomo installation wizard"
Expand Down Expand Up @@ -431,4 +435,8 @@ matomo_pass_wizard() {
fi
# Stop the web server afterwards
web_server_stop
# Enable remote access again
for vhost in "matomo-vhost.conf" "matomo-https-vhost.conf"; do
replace_in_file "/opt/bitnami/apache/conf/vhosts/$vhost" "Require local" "Require all granted"
done
}
Original file line number Diff line number Diff line change
Expand Up @@ -263,24 +263,26 @@ mysql_execute_print_output() {
fi
args+=("-N" "-u" "$user")
[[ -n "$db" ]] && args+=("$db")
# Avoid passing credentials as arguments to mysql, to avoid leaking them given a local observer with /proc read access can read them
if [[ -n "$pass" ]]; then
local pass_file
pass_file="$(credential_to_temp_file "$pass")"
args+=("-p$(<"$pass_file")")
fi
[[ "${#opts[@]}" -gt 0 ]] && args+=("${opts[@]}")
[[ "${#extra_opts[@]}" -gt 0 ]] && args+=("${extra_opts[@]}")

# Obtain the command specified via stdin
if [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
local mysql_cmd
mysql_cmd="$(</dev/stdin)"
"$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
if [[ -n "$pass" ]]; then
MYSQL_PWD="$pass" "$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
else
"$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
fi
else
# Do not store the command(s) as a variable, to avoid issues when importing large files
# https://github.com/bitnami/bitnami-docker-mariadb/issues/251
"$(mysql_binary)" "${args[@]}"
if [[ -n "$pass" ]]; then
MYSQL_PWD="$pass" "$(mysql_binary)" "${args[@]}"
else
"$(mysql_binary)" "${args[@]}"
fi
fi
}

Expand Down Expand Up @@ -992,13 +994,10 @@ mysql_healthcheck() {

root_password="$(get_master_env_var_value ROOT_PASSWORD)"
if [[ -n "$root_password" ]]; then
# Avoid passing credentials as arguments to mysqladmin, to avoid leaking them given a local observer with /proc read access can read them
local root_password_file
root_password_file="$(credential_to_temp_file "$root_password")"
args+=("-p$(<"$root_password_file")")
MYSQL_PWD="$root_password" mysqladmin "${args[@]}" ping && MYSQL_PWD="$root_password" mysqladmin "${args[@]}" status
else
mysqladmin "${args[@]}" ping && mysqladmin "${args[@]}" status
fi

mysqladmin "${args[@]}" ping && mysqladmin "${args[@]}" status
}

########################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export MATOMO_EMAIL="${MATOMO_EMAIL:-user@example.com}" # only used during the f
export MATOMO_HOST="${MATOMO_HOST:-127.0.0.1}" # only used during the first initialization
export MATOMO_WEBSITE_NAME="${MATOMO_WEBSITE_NAME:-example}" # only used during the first initialization
export MATOMO_WEBSITE_HOST="${MATOMO_WEBSITE_HOST:-https://example.org}" # only used during the first initialization
export MATOMO_ENABLE_TRUSTED_HOST_CHECK="${MATOMO_ENABLE_TRUSTED_HOST_CHECK:-no}" # only used during the first initialization
export MATOMO_ENABLE_TRUSTED_HOST_CHECK="${MATOMO_ENABLE_TRUSTED_HOST_CHECK:-yes}" # only used during the first initialization
export MATOMO_ENABLE_DATABASE_SSL="${MATOMO_ENABLE_DATABASE_SSL:-no}" # only used during the first initialization
export MATOMO_DATABASE_SSL_CA_FILE="${MATOMO_DATABASE_SSL_CA_FILE:-}" # only used during the first initialization
export MATOMO_DATABASE_SSL_CERT_FILE="${MATOMO_DATABASE_SSL_CERT_FILE:-}" # only used during the first initialization
Expand Down
2 changes: 1 addition & 1 deletion bitnami/matomo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The following tables list the main variables you can set.
| `MATOMO_HOST` | Name of a website to track in Matomo. | `127.0.0.1` |
| `MATOMO_WEBSITE_NAME` | Name of a website to track in Matomo. | `example` |
| `MATOMO_WEBSITE_HOST` | Website host or domain to track in Matomo. | `https://example.org` |
| `MATOMO_ENABLE_TRUSTED_HOST_CHECK` | Enable trusted host check. | `no` |
| `MATOMO_ENABLE_TRUSTED_HOST_CHECK` | Enable trusted host check. | `yes` |
| `MATOMO_ENABLE_DATABASE_SSL` | Whether to enable SSL for database connections in the Matomo configuration file. | `no` |
| `MATOMO_DATABASE_SSL_CA_FILE` | Path to the database server CA bundle file. | `nil` |
| `MATOMO_DATABASE_SSL_CERT_FILE` | Path to the database client certificate file. | `nil` |
Expand Down
Loading