10.12.0-debian-10-r100 release
This commit is contained in:
parent
e326e34984
commit
35dc1d4de0
|
|
@ -21,7 +21,7 @@ RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
|
|||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/postgresql/postunpack.sh
|
||||
ENV BITNAMI_APP_NAME="postgresql" \
|
||||
BITNAMI_IMAGE_VERSION="10.12.0-debian-10-r99" \
|
||||
BITNAMI_IMAGE_VERSION="10.12.0-debian-10-r100" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \
|
||||
|
|
|
|||
|
|
@ -644,11 +644,10 @@ postgresql_initialize() {
|
|||
fi
|
||||
|
||||
postgresql_debug "Ensuring expected directories/files exist..."
|
||||
for dir in "$POSTGRESQL_TMP_DIR" "$POSTGRESQL_LOG_DIR"; do
|
||||
for dir in "$POSTGRESQL_TMP_DIR" "$POSTGRESQL_LOG_DIR" "$POSTGRESQL_DATA_DIR"; do
|
||||
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!"
|
||||
|
|
@ -814,10 +813,15 @@ postgresql_start_bg() {
|
|||
local -r pg_ctl_flags=("-w" "-D" "$POSTGRESQL_DATA_DIR" "-l" "$POSTGRESQL_LOG_FILE" "-o" "--config-file=$POSTGRESQL_CONF_FILE --external_pid_file=$POSTGRESQL_PID_FILE --hba_file=$POSTGRESQL_PGHBA_FILE")
|
||||
postgresql_info "Starting PostgreSQL in background..."
|
||||
is_postgresql_running && return
|
||||
local pg_ctl_cmd=()
|
||||
if am_i_root; then
|
||||
pg_ctl_cmd+=("gosu" "$POSTGRESQL_DAEMON_USER")
|
||||
fi
|
||||
pg_ctl_cmd+=("$POSTGRESQL_BIN_DIR"/pg_ctl)
|
||||
if [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
|
||||
"$POSTGRESQL_BIN_DIR"/pg_ctl "start" "${pg_ctl_flags[@]}"
|
||||
"${pg_ctl_cmd[@]}" "start" "${pg_ctl_flags[@]}"
|
||||
else
|
||||
"$POSTGRESQL_BIN_DIR"/pg_ctl "start" "${pg_ctl_flags[@]}" >/dev/null 2>&1
|
||||
"${pg_ctl_cmd[@]}" "start" "${pg_ctl_flags[@]}" >/dev/null 2>&1
|
||||
fi
|
||||
local -r pg_isready_args=("-U" "postgres")
|
||||
local counter=$POSTGRESQL_INIT_MAX_TIMEOUT
|
||||
|
|
@ -872,17 +876,22 @@ postgresql_master_init_db() {
|
|||
am_i_root && chown "$POSTGRESQL_DAEMON_USER:$POSTGRESQL_DAEMON_GROUP" "$POSTGRESQL_INITDB_WAL_DIR"
|
||||
initdb_args+=("--waldir" "$POSTGRESQL_INITDB_WAL_DIR")
|
||||
fi
|
||||
local initdb_cmd=()
|
||||
if am_i_root; then
|
||||
initdb_cmd+=("gosu" "$POSTGRESQL_DAEMON_USER")
|
||||
fi
|
||||
initdb_cmd+=("$POSTGRESQL_BIN_DIR/initdb")
|
||||
if [[ -n "${initdb_args[*]:-}" ]]; then
|
||||
postgresql_info "Initializing PostgreSQL with ${initdb_args[*]} extra initdb arguments"
|
||||
if [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
|
||||
"$POSTGRESQL_BIN_DIR/initdb" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres" "${initdb_args[@]}"
|
||||
"${initdb_cmd[@]}" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres" "${initdb_args[@]}"
|
||||
else
|
||||
"$POSTGRESQL_BIN_DIR/initdb" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres" "${initdb_args[@]}" >/dev/null 2>&1
|
||||
"${initdb_cmd[@]}" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres" "${initdb_args[@]}" >/dev/null 2>&1
|
||||
fi
|
||||
elif [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
|
||||
"$POSTGRESQL_BIN_DIR/initdb" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres"
|
||||
"${initdb_cmd[@]}" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres"
|
||||
else
|
||||
"$POSTGRESQL_BIN_DIR/initdb" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres" >/dev/null 2>&1
|
||||
"${initdb_cmd[@]}" -E UTF8 -D "$POSTGRESQL_DATA_DIR" -U "postgres" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -898,7 +907,11 @@ postgresql_master_init_db() {
|
|||
postgresql_slave_init_db() {
|
||||
postgresql_info "Waiting for replication master to accept connections (${POSTGRESQL_INIT_MAX_TIMEOUT} timeout)..."
|
||||
local -r check_args=("-U" "$POSTGRESQL_REPLICATION_USER" "-h" "$POSTGRESQL_MASTER_HOST" "-p" "$POSTGRESQL_MASTER_PORT_NUMBER" "-d" "postgres")
|
||||
local -r check_cmd=("$POSTGRESQL_BIN_DIR"/pg_isready)
|
||||
local check_cmd=()
|
||||
if am_i_root; then
|
||||
check_cmd=("gosu" "$POSTGRESQL_DAEMON_USER")
|
||||
fi
|
||||
check_cmd+=("$POSTGRESQL_BIN_DIR"/pg_isready)
|
||||
local ready_counter=$POSTGRESQL_INIT_MAX_TIMEOUT
|
||||
|
||||
while ! PGPASSWORD=$POSTGRESQL_REPLICATION_PASSWORD "${check_cmd[@]}" "${check_args[@]}";do
|
||||
|
|
@ -912,7 +925,11 @@ postgresql_slave_init_db() {
|
|||
done
|
||||
postgresql_info "Replicating the initial database"
|
||||
local -r backup_args=("-D" "$POSTGRESQL_DATA_DIR" "-U" "$POSTGRESQL_REPLICATION_USER" "-h" "$POSTGRESQL_MASTER_HOST" "-p" "$POSTGRESQL_MASTER_PORT_NUMBER" "-X" "stream" "-w" "-v" "-P")
|
||||
local -r backup_cmd=("$POSTGRESQL_BIN_DIR"/pg_basebackup)
|
||||
local backup_cmd=()
|
||||
if am_i_root; then
|
||||
backup_cmd+=("gosu" "$POSTGRESQL_DAEMON_USER")
|
||||
fi
|
||||
backup_cmd+=("$POSTGRESQL_BIN_DIR"/pg_basebackup)
|
||||
local replication_counter=$POSTGRESQL_INIT_MAX_TIMEOUT
|
||||
while ! PGPASSWORD=$POSTGRESQL_REPLICATION_PASSWORD "${backup_cmd[@]}" "${backup_args[@]}";do
|
||||
postgresql_debug "Backup command failed. Sleeping and trying again"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ postgresql_validate
|
|||
trap "postgresql_stop" EXIT
|
||||
# Ensure 'daemon' user exists when running as 'root'
|
||||
am_i_root && ensure_user_exists "$POSTGRESQL_DAEMON_USER" "$POSTGRESQL_DAEMON_GROUP"
|
||||
# Fix logging issue when running as root
|
||||
am_i_root && chmod o+w "$(readlink /dev/stdout)"
|
||||
# Allow running custom pre-initialization scripts
|
||||
postgresql_custom_pre_init_scripts
|
||||
# Ensure PostgreSQL is initialized
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
|
|||
|
||||
* [`12-debian-10`, `12.2.0-debian-10-r99`, `12`, `12.2.0` (12/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/12.2.0-debian-10-r99/12/debian-10/Dockerfile)
|
||||
* [`11-debian-10`, `11.7.0-debian-10-r104`, `11`, `11.7.0`, `latest` (11/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/11.7.0-debian-10-r104/11/debian-10/Dockerfile)
|
||||
* [`10-debian-10`, `10.12.0-debian-10-r99`, `10`, `10.12.0` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.12.0-debian-10-r99/10/debian-10/Dockerfile)
|
||||
* [`10-debian-10`, `10.12.0-debian-10-r100`, `10`, `10.12.0` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.12.0-debian-10-r100/10/debian-10/Dockerfile)
|
||||
* [`9.6-debian-10`, `9.6.17-debian-10-r100`, `9.6`, `9.6.17` (9.6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/9.6.17-debian-10-r100/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