mirror of
https://github.com/bitnami/containers.git
synced 2026-10-10 00:11:47 +02:00
[bitnami/moodle] Release 5.2.0-debian-12-r9 (#94009)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -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-05-23T09:38:40Z" \
|
||||
org.opencontainers.image.created="2026-05-26T19:15:45Z" \
|
||||
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" \
|
||||
@@ -40,12 +40,12 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
|
||||
fi ; \
|
||||
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
|
||||
sha256sum -c "/opt/bitnami/checksums/${COMPONENT}.tar.gz.sha256" ; \
|
||||
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner ; \
|
||||
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
|
||||
done
|
||||
rm -rf "${COMPONENT}".tar.gz ; \
|
||||
done ; \
|
||||
rm -rf /opt/bitnami/checksums ;
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true
|
||||
@@ -67,7 +67,7 @@ ENV APACHE_HTTPS_PORT_NUMBER="" \
|
||||
APACHE_HTTP_PORT_NUMBER="" \
|
||||
APP_VERSION="5.2.0" \
|
||||
BITNAMI_APP_NAME="moodle" \
|
||||
IMAGE_REVISION="8" \
|
||||
IMAGE_REVISION="9" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
LD_LIBRARY_PATH="/opt/bitnami/postgresql/lib:$LD_LIBRARY_PATH" \
|
||||
|
||||
@@ -19,6 +19,7 @@ services:
|
||||
- '80:8080'
|
||||
- '443:8443'
|
||||
environment:
|
||||
- MOODLE_PASSWORD=bitnami
|
||||
- MOODLE_DATABASE_HOST=mariadb
|
||||
- MOODLE_DATABASE_PORT_NUMBER=3306
|
||||
- MOODLE_DATABASE_USER=bn_moodle
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
cc9ec4ed758ad8502b7057aa3527cc003261038cd75f0a5fa8aa885bfea46ff1 apache-2.4.67-1-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
01aa3fe1d54b7ecde2e19098de2fe93205c1c105ff31391f98f5afc3274aa99e apache-2.4.67-1-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
1c0534f33b21dc6b1754967226d002345b0461f94601a55006b91441136c240f libphp-8.4.21-0-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
949e96622f83b03c9abfdd23c4d45fefb96cbecde83a6315d8d556806a2d3e4a libphp-8.4.21-0-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
5c8facc37c5ca74c8306d4dbfc375637176e1dac52d2421918992ffe6b453fef moodle-5.2.0-0-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
ce081b8e448f3294eb5762e7fa14fb79164556f3ae50db92f4394410da3f36c5 moodle-5.2.0-0-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
774176309ecff1cb425ea9f4d887a4280404c017da7ddef06c6568345abb434e mysql-client-12.2.2-0-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
f3cb04c8b0781e306ef47be8b97409b6b19bd3f7bc6b7dcabddc242b6a9ab6c2 mysql-client-12.2.2-0-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
44db7e8074230f78383ce1d7fb574de6582abd2dd1b165bf3242c30488b81ef9 php-8.4.21-3-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
d10e7ae7a869247603e6e0c1028a2057353d14fb9e3ebc8449c8a358724d29e3 php-8.4.21-3-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
796173bb91375cbf3a454e5ac29eca0edd9d7c5ef499c9cf35b487a523c0e478 postgresql-client-14.23.0-0-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
86e1c80b22ca819d17ccb79faf278d37148bc5e48e6f9011e6c256c8892486a8 postgresql-client-14.23.0-0-linux-arm64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
374910c7361f00d393eca79a749d29f389b4522057902c7655f0a3a5ae3d1b32 render-template-1.0.9-165-linux-amd64-debian-12.tar.gz
|
||||
+1
@@ -0,0 +1 @@
|
||||
d492024d2d8261cfb147e7b508d341b91349fd41cf41aecd0706046be8cb108b render-template-1.0.9-165-linux-arm64-debian-12.tar.gz
|
||||
@@ -139,3 +139,40 @@ wait_for_log_entry() {
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Creates a secure temporary file containing the provided secret
|
||||
# Arguments:
|
||||
# $1 - secret to write to the temporary file
|
||||
# Returns:
|
||||
# String
|
||||
#########################
|
||||
credential_to_temp_file() {
|
||||
local secret="$1"
|
||||
local tmp_file
|
||||
|
||||
# Use mktemp with a specific prefix for easier debugging if something lingers
|
||||
if ! tmp_file=$(mktemp "${TMPDIR:-/tmp}/at.cred.XXXXXXXX"); then
|
||||
echo "Error: Failed to create temp file" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Restrict permissions before writing the secret
|
||||
chmod 0600 "$tmp_file"
|
||||
# Write secret and ensure it's flushed to disk
|
||||
printf "%s" "$secret" > "$tmp_file"
|
||||
# Output the filename so the caller can capture it
|
||||
echo "$tmp_file"
|
||||
}
|
||||
|
||||
########################
|
||||
# Cleans up temporary files created by credential_to_temp_file
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
cleanup_credentials() {
|
||||
debug "Cleaning up temporary files containing credentials"
|
||||
rm -rf "${TMPDIR:-/tmp}"/at.cred.*
|
||||
}
|
||||
|
||||
@@ -47,6 +47,11 @@ moodle_validate() {
|
||||
error "$1"
|
||||
error_code=1
|
||||
}
|
||||
check_empty_value() {
|
||||
if is_empty_value "${!1}"; then
|
||||
print_validation_error "${1} must be set"
|
||||
fi
|
||||
}
|
||||
check_multi_value() {
|
||||
if [[ " ${2} " != *" ${!1} "* ]]; then
|
||||
print_validation_error "The allowed values for ${1} are: ${2}"
|
||||
@@ -66,12 +71,11 @@ moodle_validate() {
|
||||
}
|
||||
|
||||
# Validate credentials
|
||||
check_empty_value "MOODLE_PASSWORD"
|
||||
if is_boolean_yes "$ALLOW_EMPTY_PASSWORD"; then
|
||||
warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}. For safety reasons, do not use this flag in a production environment."
|
||||
else
|
||||
for empty_env_var in "MOODLE_DATABASE_PASSWORD" "MOODLE_PASSWORD"; do
|
||||
is_empty_value "${!empty_env_var}" && print_validation_error "The ${empty_env_var} environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow a blank password. This is only recommended for development environments."
|
||||
done
|
||||
is_empty_value "${MOODLE_DATABASE_PASSWORD}" && print_validation_error "The MOODLE_DATABASE_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow a blank password. This is only recommended for development environments."
|
||||
fi
|
||||
|
||||
# Validate SMTP credentials
|
||||
@@ -79,8 +83,8 @@ moodle_validate() {
|
||||
for empty_env_var in "MOODLE_SMTP_USER" "MOODLE_SMTP_PASSWORD"; do
|
||||
is_empty_value "${!empty_env_var}" && warn "The ${empty_env_var} environment variable is empty or not set."
|
||||
done
|
||||
is_empty_value "$MOODLE_SMTP_PORT_NUMBER" && print_validation_error "The MOODLE_SMTP_PORT_NUMBER environment variable is empty or not set."
|
||||
! is_empty_value "$MOODLE_SMTP_PORT_NUMBER" && check_valid_port "MOODLE_SMTP_PORT_NUMBER"
|
||||
check_empty_value "MOODLE_SMTP_PORT_NUMBER"
|
||||
check_valid_port "MOODLE_SMTP_PORT_NUMBER"
|
||||
fi
|
||||
|
||||
# Compatibility with older images where 'moodledata' was located inside the 'htdocs' directory
|
||||
|
||||
@@ -263,7 +263,12 @@ mysql_execute_print_output() {
|
||||
fi
|
||||
args+=("-N" "-u" "$user")
|
||||
[[ -n "$db" ]] && args+=("$db")
|
||||
[[ -n "$pass" ]] && args+=("-p$pass")
|
||||
# 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[@]}")
|
||||
|
||||
@@ -271,7 +276,6 @@ mysql_execute_print_output() {
|
||||
if [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
|
||||
local mysql_cmd
|
||||
mysql_cmd="$(</dev/stdin)"
|
||||
debug "Executing SQL command:\n$mysql_cmd"
|
||||
"$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
|
||||
else
|
||||
# Do not store the command(s) as a variable, to avoid issues when importing large files
|
||||
@@ -988,7 +992,10 @@ mysql_healthcheck() {
|
||||
|
||||
root_password="$(get_master_env_var_value ROOT_PASSWORD)"
|
||||
if [[ -n "$root_password" ]]; then
|
||||
args+=("-p${root_password}")
|
||||
# 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")")
|
||||
fi
|
||||
|
||||
mysqladmin "${args[@]}" ping && mysqladmin "${args[@]}" status
|
||||
|
||||
@@ -93,7 +93,7 @@ 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_PASSWORD="${MOODLE_PASSWORD:-}" # only used during the first initialization
|
||||
export MOODLE_EMAIL="${MOODLE_EMAIL:-user@example.com}" # only used during the first initialization
|
||||
|
||||
# Moodle SMTP credentials
|
||||
|
||||
@@ -83,7 +83,7 @@ The following tables list the main variables you can set.
|
||||
| `MOODLE_SSLPROXY` | Activate the sslproxy feature of Moodle. | `no` |
|
||||
| `MOODLE_LANG` | Allow to define default site language | `en` |
|
||||
| `MOODLE_USERNAME` | Moodle user name. | `user` |
|
||||
| `MOODLE_PASSWORD` | Moodle user password. | `bitnami` |
|
||||
| `MOODLE_PASSWORD` | Moodle user password. | `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` |
|
||||
|
||||
@@ -19,6 +19,7 @@ services:
|
||||
- '80:8080'
|
||||
- '443:8443'
|
||||
environment:
|
||||
- MOODLE_PASSWORD=bitnami
|
||||
- MOODLE_DATABASE_HOST=mariadb
|
||||
- MOODLE_DATABASE_PORT_NUMBER=3306
|
||||
- MOODLE_DATABASE_USER=bn_moodle
|
||||
|
||||
Reference in New Issue
Block a user