1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-12-08 12:48:39 +03:00

Merge pull request #642 from infosiftr/temporary-port

Adjust "docker_temp_server_start" to override port for consistent unix socket path
This commit is contained in:
yosifkit
2019-11-26 15:40:26 -08:00
committed by GitHub
13 changed files with 65 additions and 26 deletions

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

View File

@@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi
# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432
PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}