diff --git a/8.4/docker-entrypoint.sh b/8.4/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/8.4/docker-entrypoint.sh +++ b/8.4/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb diff --git a/9.0/docker-entrypoint.sh b/9.0/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/9.0/docker-entrypoint.sh +++ b/9.0/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 6d546b4816..27c98d2147 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -4,6 +4,9 @@ set -e if [ "$1" = 'postgres' ]; then chown -R postgres "$PGDATA" + chmod g+s /run/postgresql + chown -R postgres:postgres /run/postgresql + if [ -z "$(ls -A "$PGDATA")" ]; then gosu postgres initdb