10.15.0-debian-10-r65 release
This commit is contained in:
parent
fcbc12e61a
commit
b9b23dfcf6
|
|
@ -24,7 +24,7 @@ COPY rootfs /
|
|||
RUN /opt/bitnami/scripts/postgresql-repmgr/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/locales/add-extra-locales.sh
|
||||
ENV BITNAMI_APP_NAME="postgresql-repmgr" \
|
||||
BITNAMI_IMAGE_VERSION="10.15.0-debian-10-r64" \
|
||||
BITNAMI_IMAGE_VERSION="10.15.0-debian-10-r65" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
########################
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ eval "$(repmgr_set_role)"
|
|||
# Ensure PostgreSQL is stopped when this script ends.
|
||||
trap "postgresql_stop" EXIT
|
||||
# Ensure 'daemon' user exists when running as 'root'
|
||||
am_i_root && ensure_user_exists "$POSTGRESQL_DAEMON_USER" "$POSTGRESQL_DAEMON_GROUP"
|
||||
am_i_root && ensure_user_exists "$POSTGRESQL_DAEMON_USER" --group "$POSTGRESQL_DAEMON_GROUP"
|
||||
# Prepare PostgreSQL default configuration
|
||||
repmgr_postgresql_configuration
|
||||
# Prepare repmgr configuration
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
* [`13`, `13-debian-10`, `13.1.0`, `13.1.0-debian-10-r64` (13/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/13.1.0-debian-10-r64/13/debian-10/Dockerfile)
|
||||
* [`12`, `12-debian-10`, `12.5.0`, `12.5.0-debian-10-r67` (12/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/12.5.0-debian-10-r67/12/debian-10/Dockerfile)
|
||||
* [`11`, `11-debian-10`, `11.10.0`, `11.10.0-debian-10-r64`, `latest` (11/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/11.10.0-debian-10-r64/11/debian-10/Dockerfile)
|
||||
* [`10`, `10-debian-10`, `10.15.0`, `10.15.0-debian-10-r64` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.15.0-debian-10-r64/10/debian-10/Dockerfile)
|
||||
* [`10`, `10-debian-10`, `10.15.0`, `10.15.0-debian-10-r65` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/10.15.0-debian-10-r65/10/debian-10/Dockerfile)
|
||||
* [`9.6`, `9.6-debian-10`, `9.6.20`, `9.6.20-debian-10-r65` (9.6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql-repmgr/blob/9.6.20-debian-10-r65/9.6/debian-10/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/postgresql-repmgr GitHub repo](https://github.com/bitnami/bitnami-docker-postgresql-repmgr).
|
||||
|
|
|
|||
Loading…
Reference in New Issue