4.2.5-debian-10-r28 release

This commit is contained in:
Bitnami Bot 2021-10-12 18:18:17 +00:00
parent c0d26aea61
commit 3fe0e773d0
3 changed files with 46 additions and 3 deletions

View File

@ -18,7 +18,7 @@ RUN chmod g+rwX /opt/bitnami
COPY rootfs /
RUN /opt/bitnami/scripts/pgpool/postunpack.sh
ENV BITNAMI_APP_NAME="pgpool" \
BITNAMI_IMAGE_VERSION="4.2.5-debian-10-r27" \
BITNAMI_IMAGE_VERSION="4.2.5-debian-10-r28" \
PATH="/opt/bitnami/postgresql/bin:/opt/bitnami/common/bin:/opt/bitnami/pgpool/bin:$PATH" \
POSTGRESQL_CLIENT_CREATE_DATABASE_NAME="" \
POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD="" \

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 @@ 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/).
* [`4`, `4-debian-10`, `4.2.5`, `4.2.5-debian-10-r27`, `latest` (4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-pgpool/blob/4.2.5-debian-10-r27/4/debian-10/Dockerfile)
* [`4`, `4-debian-10`, `4.2.5`, `4.2.5-debian-10-r28`, `latest` (4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-pgpool/blob/4.2.5-debian-10-r28/4/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/pgpool GitHub repo](https://github.com/bitnami/bitnami-docker-pgpool).