9.6.17-debian-10-r13 release
This commit is contained in:
parent
5cc7ab6a1e
commit
1a5983ef09
|
|
@ -22,7 +22,7 @@ RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
|
|||
COPY rootfs /
|
||||
RUN /postunpack.sh
|
||||
ENV BITNAMI_APP_NAME="postgresql" \
|
||||
BITNAMI_IMAGE_VERSION="9.6.17-debian-10-r12" \
|
||||
BITNAMI_IMAGE_VERSION="9.6.17-debian-10-r13" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NAMI_PREFIX="/.nami" \
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
#
|
||||
# Library for network functions
|
||||
|
||||
# Load Generic Libraries
|
||||
. /liblog.sh
|
||||
|
||||
# Functions
|
||||
|
||||
########################
|
||||
|
|
@ -42,3 +45,59 @@ is_hostname_resolved() {
|
|||
false
|
||||
fi
|
||||
}
|
||||
|
||||
########################
|
||||
# Parse URL
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# $1 - uri - String
|
||||
# $2 - component to obtain. Valid options (scheme, authority, userinfo, host, port, path, query or fragment) - String
|
||||
# Returns:
|
||||
# String
|
||||
parse_uri() {
|
||||
local uri="${1:?uri is missing}"
|
||||
local component="${2:?component is missing}"
|
||||
|
||||
# Solution based on https://tools.ietf.org/html/rfc3986#appendix-B with
|
||||
# additional sub-expressions to split authority into userinfo, host and port
|
||||
# Credits to Patryk Obara (see https://stackoverflow.com/a/45977232/6694969)
|
||||
local -r URI_REGEX='^(([^:/?#]+):)?(//((([^:/?#]+)@)?([^:/?#]+)(:([0-9]+))?))?(/([^?#]*))(\?([^#]*))?(#(.*))?'
|
||||
# || | ||| | | | | | | | | |
|
||||
# |2 scheme | ||6 userinfo 7 host | 9 port | 11 rpath | 13 query | 15 fragment
|
||||
# 1 scheme: | |5 userinfo@ 8 :... 10 path 12 ?... 14 #...
|
||||
# | 4 authority
|
||||
# 3 //...
|
||||
local index=0
|
||||
case "$component" in
|
||||
scheme)
|
||||
index=2
|
||||
;;
|
||||
authority)
|
||||
index=4
|
||||
;;
|
||||
userinfo)
|
||||
index=6
|
||||
;;
|
||||
host)
|
||||
index=7
|
||||
;;
|
||||
port)
|
||||
index=9
|
||||
;;
|
||||
path)
|
||||
index=10
|
||||
;;
|
||||
query)
|
||||
index=13
|
||||
;;
|
||||
fragment)
|
||||
index=14
|
||||
;;
|
||||
*)
|
||||
stderr_print "unrecognized component $1"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
[[ "$uri" =~ $URI_REGEX ]] && echo "${BASH_REMATCH[${index}]}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -621,6 +621,7 @@ postgresql_clean_from_restart() {
|
|||
postgresql_initialize() {
|
||||
postgresql_info "Initializing PostgreSQL database..."
|
||||
postgresql_clean_from_restart
|
||||
|
||||
# This fixes an issue where the trap would kill the entrypoint.sh, if a PID was left over from a previous run
|
||||
# Exec replaces the process without creating a new one, and when the container is restarted it may have the same PID
|
||||
rm -f "$POSTGRESQL_PID_FILE"
|
||||
|
|
@ -648,6 +649,11 @@ postgresql_initialize() {
|
|||
ensure_dir_exists "$dir"
|
||||
am_i_root && chown "$POSTGRESQL_DAEMON_USER:$POSTGRESQL_DAEMON_GROUP" "$dir"
|
||||
done
|
||||
ensure_dir_exists "$POSTGRESQL_DATA_DIR"
|
||||
am_i_root && find "$POSTGRESQL_DATA_DIR" -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" -exec chown -R "$POSTGRESQL_DAEMON_USER:$POSTGRESQL_DAEMON_GROUP" {} \;
|
||||
chmod u+rwx "$POSTGRESQL_DATA_DIR" || postgresql_warn "Lack of permissions on data directory!"
|
||||
chmod go-rwx "$POSTGRESQL_DATA_DIR" || postgresql_warn "Lack of permissions on data directory!"
|
||||
|
||||
is_boolean_yes "$create_conf_file" && postgresql_create_config
|
||||
is_boolean_yes "$create_pghba_file" && postgresql_create_pghba && postgresql_allow_local_connection
|
||||
|
||||
|
|
@ -660,8 +666,6 @@ postgresql_initialize() {
|
|||
[[ "$POSTGRESQL_REPLICATION_MODE" = "master" ]] && [[ -n "$POSTGRESQL_REPLICATION_USER" ]] && is_boolean_yes "$create_pghba_file" && postgresql_add_replication_to_pghba
|
||||
[[ "$POSTGRESQL_REPLICATION_MODE" = "slave" ]] && postgresql_configure_recovery
|
||||
else
|
||||
ensure_dir_exists "$POSTGRESQL_DATA_DIR"
|
||||
am_i_root && chown "$POSTGRESQL_DAEMON_USER:$POSTGRESQL_DAEMON_GROUP" "$POSTGRESQL_DATA_DIR"
|
||||
if [[ "$POSTGRESQL_REPLICATION_MODE" = "master" ]]; then
|
||||
postgresql_master_init_db
|
||||
postgresql_start_bg
|
||||
|
|
@ -920,7 +924,6 @@ postgresql_slave_init_db() {
|
|||
exit 1
|
||||
fi
|
||||
done
|
||||
chmod 0700 "$POSTGRESQL_DATA_DIR"
|
||||
}
|
||||
|
||||
########################
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
* [`10-ol-7`, `10.12.0-ol-7-r10` (10/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.12.0-ol-7-r10/10/ol-7/Dockerfile)
|
||||
* [`10-debian-10`, `10.12.0-debian-10-r11`, `10`, `10.12.0` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.12.0-debian-10-r11/10/debian-10/Dockerfile)
|
||||
* [`9.6-ol-7`, `9.6.17-ol-7-r10` (9.6/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/9.6.17-ol-7-r10/9.6/ol-7/Dockerfile)
|
||||
* [`9.6-debian-10`, `9.6.17-debian-10-r12`, `9.6`, `9.6.17` (9.6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/9.6.17-debian-10-r12/9.6/debian-10/Dockerfile)
|
||||
* [`9.6-debian-10`, `9.6.17-debian-10-r13`, `9.6`, `9.6.17` (9.6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/9.6.17-debian-10-r13/9.6/debian-10/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/postgresql GitHub repo](https://github.com/bitnami/bitnami-docker-postgresql).
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue