3.11.3-debian-10-r30 release

This commit is contained in:
Bitnami Bot 2021-10-12 12:01:26 +00:00
parent f6d9d5e94f
commit 5f0ebf52f5
3 changed files with 46 additions and 3 deletions

View File

@ -39,7 +39,7 @@ ENV ALLOW_EMPTY_PASSWORD="no" \
APACHE_HTTPS_PORT_NUMBER="" \
APACHE_HTTP_PORT_NUMBER="" \
BITNAMI_APP_NAME="moodle" \
BITNAMI_IMAGE_VERSION="3.11.3-debian-10-r29" \
BITNAMI_IMAGE_VERSION="3.11.3-debian-10-r30" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US:en" \
MARIADB_HOST="mariadb" \

View File

@ -39,18 +39,24 @@ group_exists() {
# Arguments:
# $1 - group
# Flags:
# -i|--gid - the ID for the new group
# -s|--system - Whether to create new user as system user (uid <= 999)
# Returns:
# None
#########################
ensure_group_exists() {
local group="${1:?group is missing}"
local gid=""
local is_system_user=false
# Validate arguments
shift 1
while [ "$#" -gt 0 ]; do
case "$1" in
-i|--gid)
shift
gid="${1:?missing gid}"
;;
-s|--system)
is_system_user=true
;;
@ -64,6 +70,13 @@ ensure_group_exists() {
if ! group_exists "$group"; then
local -a args=("$group")
if [[ -n "$gid" ]]; then
if group_exists "$gid" ; then
error "The GID $gid is already in use." >&2
return 1
fi
args+=("--gid" "$gid")
fi
$is_system_user && args+=("--system")
groupadd "${args[@]}" >/dev/null 2>&1
fi
@ -74,7 +87,9 @@ ensure_group_exists() {
# Arguments:
# $1 - user
# Flags:
# -i|--uid - the ID for the new user
# -g|--group - the group the new user should belong to
# -a|--append-groups - comma-separated list of supplemental groups to append to the new user
# -h|--home - the home directory for the new user
# -s|--system - whether to create new user as system user (uid <= 999)
# Returns:
@ -82,7 +97,9 @@ ensure_group_exists() {
#########################
ensure_user_exists() {
local user="${1:?user is missing}"
local uid=""
local group=""
local append_groups=""
local home=""
local is_system_user=false
@ -90,10 +107,18 @@ ensure_user_exists() {
shift 1
while [ "$#" -gt 0 ]; do
case "$1" in
-i|--uid)
shift
uid="${1:?missing uid}"
;;
-g|--group)
shift
group="${1:?missing group}"
;;
-a|--append-groups)
shift
append_groups="${1:?missing append_groups}"
;;
-h|--home)
shift
home="${1:?missing home directory}"
@ -111,7 +136,15 @@ ensure_user_exists() {
if ! user_exists "$user"; then
local -a user_args=("-N" "$user")
$is_system_user && user_args+=("--system")
if [[ -n "$uid" ]]; then
if user_exists "$uid" ; then
error "The UID $uid is already in use."
return 1
fi
user_args+=("--uid" "$uid")
else
$is_system_user && user_args+=("--system")
fi
useradd "${user_args[@]}" >/dev/null 2>&1
fi
@ -122,6 +155,15 @@ ensure_user_exists() {
usermod -g "$group" "$user" >/dev/null 2>&1
fi
if [[ -n "$append_groups" ]]; then
local -a groups
read -ra groups <<< "$(tr ',;' ' ' <<< "$append_groups")"
for group in "${groups[@]}"; do
ensure_group_exists "$group"
usermod -aG "$group" "$user" >/dev/null 2>&1
done
fi
if [[ -n "$home" ]]; then
mkdir -p "$home"
usermod -d "$home" "$user" >/dev/null 2>&1
@ -403,3 +445,4 @@ generate_sha_hash() {
local -r algorithm="${2:-1}"
echo -n "$str" | "sha${algorithm}sum" | awk '{print $1}'
}

View File

@ -39,7 +39,7 @@ Bitnami containers can be used with [Kubeapps](https://kubeapps.com/) for deploy
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
* [`3`, `3-debian-10`, `3.11.3`, `3.11.3-debian-10-r29`, `latest` (3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-moodle/blob/3.11.3-debian-10-r29/3/debian-10/Dockerfile)
* [`3`, `3-debian-10`, `3.11.3`, `3.11.3-debian-10-r30`, `latest` (3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-moodle/blob/3.11.3-debian-10-r30/3/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/moodle GitHub repo](https://github.com/bitnami/bitnami-docker-moodle).