[bitnami/moodle] Release 5.1.1-debian-12-r4 (#90001)

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Bitnami Bot
2026-01-28 02:02:25 +01:00
committed by GitHub
parent 427aeae8a2
commit 9115427fe5
7 changed files with 27 additions and 49 deletions
+5 -5
View File
@@ -9,7 +9,7 @@ ARG TARGETARCH
ARG WITH_ALL_LOCALES="no"
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2026-01-11T09:02:39Z" \
org.opencontainers.image.created="2026-01-28T00:35:24Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/moodle/README.md" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/moodle" \
@@ -29,12 +29,12 @@ 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-160-linux-${OS_ARCH}-debian-12" \
"php-8.4.16-1-linux-${OS_ARCH}-debian-12" \
"render-template-1.0.9-161-linux-${OS_ARCH}-debian-12" \
"php-8.4.17-2-linux-${OS_ARCH}-debian-12" \
"apache-2.4.66-0-linux-${OS_ARCH}-debian-12" \
"postgresql-client-14.20.0-0-linux-${OS_ARCH}-debian-12" \
"mysql-client-12.1.2-0-linux-${OS_ARCH}-debian-12" \
"libphp-8.4.16-0-linux-${OS_ARCH}-debian-12" \
"libphp-8.4.17-0-linux-${OS_ARCH}-debian-12" \
"moodle-5.1.1-0-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \
@@ -67,7 +67,7 @@ ENV APACHE_HTTPS_PORT_NUMBER="" \
APACHE_HTTP_PORT_NUMBER="" \
APP_VERSION="5.1.1" \
BITNAMI_APP_NAME="moodle" \
IMAGE_REVISION="3" \
IMAGE_REVISION="4" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US:en" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/apache/bin:/opt/bitnami/postgresql/bin:/opt/bitnami/mysql/bin:$PATH"
@@ -24,9 +24,9 @@ CYAN='\033[38;5;6m'
stderr_print() {
# 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it
local bool="${BITNAMI_QUIET:-false}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if ! [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then
# converts the string to lowercase
local bool_val="${bool,,}"
if ! [[ "$bool_val" = 1 || "$bool_val" =~ ^(yes|true)$ ]]; then
printf "%b\\n" "${*}" >&2
fi
}
@@ -40,9 +40,9 @@ stderr_print() {
#########################
log() {
local color_bool="${BITNAMI_COLOR:-true}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if [[ "$color_bool" = 1 || "$color_bool" =~ ^(yes|true)$ ]]; then
# converts the string to lowercase
local color_bool_val="${color_bool,,}"
if [[ "$color_bool_val" = 1 || "$color_bool_val" =~ ^(yes|true)$ ]]; then
stderr_print "${CYAN}${MODULE:-} ${MAGENTA}$(date "+%T.%2N ")${RESET}${*}"
else
stderr_print "${MODULE:-} $(date "+%T.%2N ")${*}"
@@ -58,9 +58,9 @@ log() {
info() {
local msg_color=""
local color_bool="${BITNAMI_COLOR:-true}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if [[ "$color_bool" = 1 || "$color_bool" =~ ^(yes|true)$ ]];then
# converts the string to lowercase
local color_bool_val="${color_bool,,}"
if [[ "$color_bool_val" = 1 || "$color_bool_val" =~ ^(yes|true)$ ]]; then
msg_color="$GREEN"
fi
log "${msg_color}INFO ${RESET} ==> ${*}"
@@ -75,9 +75,9 @@ info() {
warn() {
local msg_color=""
local color_bool="${BITNAMI_COLOR:-true}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if [[ "$color_bool" = 1 || "$color_bool" =~ ^(yes|true)$ ]];then
# converts the string to lowercase
local color_bool_val="${color_bool,,}"
if [[ "$color_bool_val" = 1 || "$color_bool_val" =~ ^(yes|true)$ ]]; then
msg_color="$YELLOW"
fi
log "${msg_color}WARN ${RESET} ==> ${*}"
@@ -92,9 +92,9 @@ warn() {
error() {
local msg_color=""
local color_bool="${BITNAMI_COLOR:-true}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if [[ "$color_bool" = 1 || "$color_bool" =~ ^(yes|true)$ ]];then
# converts the string to lowercase
local color_bool_val="${color_bool,,}"
if [[ "$color_bool_val" = 1 || "$color_bool_val" =~ ^(yes|true)$ ]]; then
msg_color="$RED"
fi
log "${msg_color}ERROR${RESET} ==> ${*}"
@@ -111,9 +111,9 @@ error() {
debug() {
local msg_color=""
local color_bool="${BITNAMI_COLOR:-true}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if [[ "$color_bool" = 1 || "$color_bool" =~ ^(yes|true)$ ]] ;then
# converts the string to lowercase
local color_bool_val="${color_bool,,}"
if [[ "$color_bool_val" = 1 || "$color_bool_val" =~ ^(yes|true)$ ]]; then
msg_color="$MAGENTA"
fi
local debug_bool="${BITNAMI_DEBUG:-false}"
@@ -109,7 +109,7 @@ parse_uri() {
# Solution based on https://tools.ietf.org/html/rfc3986#appendix-B with
# additional sub-expressions to split authority into userinfo, host and port
# Credits to Patryk Obara (see https://stackoverflow.com/a/45977232/6694969)
local -r URI_REGEX='^(([^:/?#]+):)?(//((([^@/?#]+)@)?([^:/?#]+)(:([0-9]+))?))?(/([^?#]*))?(\?([^#]*))?(#(.*))?'
local -r URI_REGEX='^(([^:/?#]+):)?(//((([^@/?#]+)@)?([^:/?#]+|\[[0-9a-fA-F:.]+\])(:([0-9]+))?))?(/([^?#]*))?(\?([^#]*))?(#(.*))?'
# || | ||| | | | | | | | | |
# |2 scheme | ||6 userinfo 7 host | 9 port | 11 rpath | 13 query | 15 fragment
# 1 scheme: | |5 userinfo@ 8 :... 10 path 12 ?... 14 #...
@@ -52,9 +52,9 @@ is_positive_int() {
#########################
is_boolean_yes() {
local -r bool="${1:-}"
# comparison is performed without regard to the case of alphabetic characters
shopt -s nocasematch
if [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then
# converts the string to lowercase
local bool_val="${bool,,}"
if [[ "$bool_val" = 1 || "$bool_val" =~ ^(yes|true)$ ]]; then
true
else
false
@@ -101,23 +101,6 @@ moodle_validate() {
return "$error_code"
}
########################
# Bypass Azure for ManagedDB database version check
# We detected some issues in the way that Azure Database for MariaDB
# shows the version. This hack will bypass the Moodle installation check
# Globals:
# MOODLE_*
# Arguments:
# None
# Returns:
# None
#########################
moodle_fix_manageddb_check() {
info "Changing minimum required MariaDB version to $MOODLE_DATABASE_MIN_VERSION"
replace_in_file "$MOODLE_BASE_DIR/admin/environment.xml" "name=\"mariadb\" version=\"[^\"]+\"" "name=\"mariadb\" version=\"$MOODLE_DATABASE_MIN_VERSION\""
replace_in_file "$MOODLE_BASE_DIR/admin/environment.xml" "name=\"mysql\" version=\"[^\"]+\"" "name=\"mysql\" version=\"$MOODLE_DATABASE_MIN_VERSION\""
}
########################
# Ensure Moodle is initialized
# Globals:
@@ -344,8 +327,6 @@ moodle_install() {
"--agree-license"
"$@"
)
# HACK: Change database version check for Azure Database for MariaDB
! is_empty_value "$MOODLE_DATABASE_MIN_VERSION" && moodle_fix_manageddb_check
pushd "$MOODLE_BASE_DIR" >/dev/null || exit
# Run as web server user to avoid having to change permissions/ownership afterwards
if am_i_root; then
@@ -36,7 +36,6 @@ moodle_env_vars=(
MOODLE_LANG
MOODLE_USERNAME
MOODLE_PASSWORD
MOODLE_DATABASE_MIN_VERSION
MOODLE_EMAIL
MOODLE_SMTP_HOST
MOODLE_SMTP_PORT_NUMBER
@@ -95,7 +94,6 @@ export MOODLE_LANG="${MOODLE_LANG:-en}"
# Moodle credentials
export MOODLE_USERNAME="${MOODLE_USERNAME:-user}" # only used during the first initialization
export MOODLE_PASSWORD="${MOODLE_PASSWORD:-bitnami}" # only used during the first initialization
export MOODLE_DATABASE_MIN_VERSION="${MOODLE_DATABASE_MIN_VERSION:-}" # only used during the first initialization
export MOODLE_EMAIL="${MOODLE_EMAIL:-user@example.com}" # only used during the first initialization
# Moodle SMTP credentials
-1
View File
@@ -213,7 +213,6 @@ docker run -d --name moodle \
| `MOODLE_LANG` | Allow to define default site language | `en` |
| `MOODLE_USERNAME` | Moodle user name. | `user` |
| `MOODLE_PASSWORD` | Moodle user password. | `bitnami` |
| `MOODLE_DATABASE_MIN_VERSION` | Change database minimum version because of an issue with Azure Database for MariaDB. | `nil` |
| `MOODLE_EMAIL` | Moodle user e-mail address. | `user@example.com` |
| `MOODLE_SMTP_HOST` | Moodle SMTP server host. | `nil` |
| `MOODLE_SMTP_PORT_NUMBER` | Moodle SMTP server port number. | `nil` |