3.3.2-debian-10-r67 release
This commit is contained in:
parent
fda18a6d03
commit
7de34641a5
|
|
@ -31,7 +31,7 @@ ENV ALLOW_EMPTY_PASSWORD="no" \
|
|||
APACHE_HTTPS_PORT_NUMBER="" \
|
||||
APACHE_HTTP_PORT_NUMBER="" \
|
||||
BITNAMI_APP_NAME="phpbb" \
|
||||
BITNAMI_IMAGE_VERSION="3.3.2-debian-10-r66" \
|
||||
BITNAMI_IMAGE_VERSION="3.3.2-debian-10-r67" \
|
||||
MARIADB_HOST="mariadb" \
|
||||
MARIADB_PORT_NUMBER="3306" \
|
||||
MARIADB_ROOT_PASSWORD="" \
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
########################
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ set -o pipefail
|
|||
apache_validate
|
||||
|
||||
# Ensure Apache daemon user exists when running as 'root'
|
||||
am_i_root && ensure_user_exists "$APACHE_DAEMON_USER" "$APACHE_DAEMON_GROUP"
|
||||
am_i_root && ensure_user_exists "$APACHE_DAEMON_USER" --group "$APACHE_DAEMON_GROUP"
|
||||
|
||||
# Ensure Apache is initialized
|
||||
apache_initialize
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ cp "${BITNAMI_ROOT_DIR}/scripts/phpbb/files/install_config.json" "$PHPBB_INSTALL
|
|||
|
||||
# Ensure the phpBB base directory exists and has proper permissions
|
||||
info "Configuring file permissions for phpBB"
|
||||
ensure_user_exists "$WEB_SERVER_DAEMON_USER" "$WEB_SERVER_DAEMON_GROUP"
|
||||
ensure_user_exists "$WEB_SERVER_DAEMON_USER" --group "$WEB_SERVER_DAEMON_GROUP"
|
||||
for dir in "$PHPBB_BASE_DIR" "$PHPBB_VOLUME_DIR"; do
|
||||
ensure_dir_exists "$dir"
|
||||
# Use daemon:root ownership for compatibility when running as a non-root user
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Non-root container images add an extra layer of security and are generally recom
|
|||
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.3.2`, `3.3.2-debian-10-r66`, `latest` (3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-phpbb/blob/3.3.2-debian-10-r66/3/debian-10/Dockerfile)
|
||||
* [`3`, `3-debian-10`, `3.3.2`, `3.3.2-debian-10-r67`, `latest` (3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-phpbb/blob/3.3.2-debian-10-r67/3/debian-10/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/phpbb GitHub repo](https://github.com/bitnami/bitnami-docker-phpbb).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue