8.9.12-debian-10-r7 release

This commit is contained in:
Bitnami Bot 2021-01-16 12:21:54 +00:00
parent c26620e861
commit 2f94a0f6f8
6 changed files with 68 additions and 10 deletions

View File

@ -27,7 +27,7 @@ RUN /opt/bitnami/scripts/drupal/postunpack.sh
RUN /opt/bitnami/scripts/mysql-client/postunpack.sh
ENV ALLOW_EMPTY_PASSWORD="no" \
BITNAMI_APP_NAME="drupal-nginx" \
BITNAMI_IMAGE_VERSION="8.9.12-debian-10-r6" \
BITNAMI_IMAGE_VERSION="8.9.12-debian-10-r7" \
MARIADB_HOST="mariadb" \
MARIADB_PORT_NUMBER="3306" \
MARIADB_ROOT_PASSWORD="" \

View File

@ -37,14 +37,34 @@ group_exists() {
# Create a group in the system if it does not exist already
# Arguments:
# $1 - group
# Flags:
# -s|--system - Whether to create new user as system user (uid <= 999)
# Returns:
# None
#########################
ensure_group_exists() {
local group="${1:?group is missing}"
local is_system_user=false
# Validate arguments
shift 1
while [ "$#" -gt 0 ]; do
case "$1" in
-s|--system)
is_system_user=true
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
if ! group_exists "$group"; then
groupadd "$group" >/dev/null 2>&1
local -a args=("$group")
$is_system_user && args+=("--system")
groupadd "${args[@]}" >/dev/null 2>&1
fi
}
@ -52,22 +72,60 @@ ensure_group_exists() {
# Create an user in the system if it does not exist already
# Arguments:
# $1 - user
# $2 - group
# Flags:
# -g|--group - the group the new user should belong to
# -h|--home - the home directory for the new user
# -s|--system - whether to create new user as system user (uid <= 999)
# Returns:
# None
#########################
ensure_user_exists() {
local user="${1:?user is missing}"
local group="${2:-}"
local group=""
local home=""
local is_system_user=false
# Validate arguments
shift 1
while [ "$#" -gt 0 ]; do
case "$1" in
-g|--group)
shift
group="${1:?missing group}"
;;
-h|--home)
shift
home="${1:?missing home directory}"
;;
-s|--system)
is_system_user=true
;;
*)
echo "Invalid command line flag $1" >&2
return 1
;;
esac
shift
done
if ! user_exists "$user"; then
useradd "$user" >/dev/null 2>&1
local -a user_args=("-N" "$user")
$is_system_user && user_args+=("--system")
useradd "${user_args[@]}" >/dev/null 2>&1
fi
if [[ -n "$group" ]]; then
ensure_group_exists "$group"
local -a group_args=("$group")
$is_system_user && group_args+=("--system")
ensure_group_exists "${group_args[@]}"
usermod -a -G "$group" "$user" >/dev/null 2>&1
fi
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"
fi
}
########################

View File

@ -140,7 +140,7 @@ nginx_initialize() {
local nginx_user_configuration
if am_i_root; then
debug "Ensuring NGINX daemon user/group exists"
ensure_user_exists "$NGINX_DAEMON_USER" "$NGINX_DAEMON_GROUP"
ensure_user_exists "$NGINX_DAEMON_USER" --group "$NGINX_DAEMON_GROUP"
if [[ -n "${NGINX_DAEMON_USER:-}" ]]; then
chown -R "${NGINX_DAEMON_USER:-}" "$NGINX_TMP_DIR"
fi

View File

@ -22,7 +22,7 @@ nginx_validate
trap "nginx_stop" EXIT
# Ensure NGINX daemon user exists when running as 'root'
am_i_root && ensure_user_exists "$NGINX_DAEMON_USER" "$NGINX_DAEMON_GROUP"
am_i_root && ensure_user_exists "$NGINX_DAEMON_USER" --group "$NGINX_DAEMON_GROUP"
# Fix logging issue when running as root
! am_i_root || chmod o+w "$(readlink /dev/stdout)" "$(readlink /dev/stderr)"

View File

@ -17,7 +17,7 @@ set -o pipefail
# Ensure PHP-FPM daemon user exists and required folder belongs to this user when running as 'root'
if am_i_root; then
ensure_user_exists "$PHP_FPM_DAEMON_USER" "$PHP_FPM_DAEMON_GROUP"
ensure_user_exists "$PHP_FPM_DAEMON_USER" --group "$PHP_FPM_DAEMON_GROUP"
ensure_dir_exists "$PHP_TMP_DIR"
chown -R "${PHP_FPM_DAEMON_USER}:${PHP_FPM_DAEMON_GROUP}" "$PHP_TMP_DIR"
# Enable daemon configuration

View File

@ -43,7 +43,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
* [`9`, `9-debian-10`, `9.1.2`, `9.1.2-debian-10-r7`, `latest` (9/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal-nginx/blob/9.1.2-debian-10-r7/9/debian-10/Dockerfile)
* [`8`, `8-debian-10`, `8.9.12`, `8.9.12-debian-10-r6` (8/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal-nginx/blob/8.9.12-debian-10-r6/8/debian-10/Dockerfile)
* [`8`, `8-debian-10`, `8.9.12`, `8.9.12-debian-10-r7` (8/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal-nginx/blob/8.9.12-debian-10-r7/8/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/drupal-nginx GitHub repo](https://github.com/bitnami/bitnami-docker-drupal-nginx).