mirror of
https://github.com/bitnami/containers.git
synced 2026-03-03 06:58:07 +08:00
12.8.0-debian-10-r60 release
This commit is contained in:
@@ -22,7 +22,7 @@ COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/postgresql/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/locales/add-extra-locales.sh
|
||||
ENV BITNAMI_APP_NAME="postgresql" \
|
||||
BITNAMI_IMAGE_VERSION="12.8.0-debian-10-r59" \
|
||||
BITNAMI_IMAGE_VERSION="12.8.0-debian-10-r60" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \
|
||||
|
||||
@@ -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}'
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
||||
|
||||
|
||||
* [`13`, `13-debian-10`, `13.4.0`, `13.4.0-debian-10-r58` (13/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/13.4.0-debian-10-r58/13/debian-10/Dockerfile)
|
||||
* [`12`, `12-debian-10`, `12.8.0`, `12.8.0-debian-10-r59` (12/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/12.8.0-debian-10-r59/12/debian-10/Dockerfile)
|
||||
* [`12`, `12-debian-10`, `12.8.0`, `12.8.0-debian-10-r60` (12/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/12.8.0-debian-10-r60/12/debian-10/Dockerfile)
|
||||
* [`11`, `11-debian-10`, `11.13.0`, `11.13.0-debian-10-r59`, `latest` (11/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/11.13.0-debian-10-r59/11/debian-10/Dockerfile)
|
||||
* [`10`, `10-debian-10`, `10.18.0`, `10.18.0-debian-10-r59` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.18.0-debian-10-r59/10/debian-10/Dockerfile)
|
||||
* [`9.6`, `9.6-debian-10`, `9.6.23`, `9.6.23-debian-10-r59` (9.6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/9.6.23-debian-10-r59/9.6/debian-10/Dockerfile)
|
||||
|
||||
Reference in New Issue
Block a user