diff --git a/10/alpine/docker-entrypoint.sh b/10/alpine/docker-entrypoint.sh index 78adac6212..e761e26cbc 100755 --- a/10/alpine/docker-entrypoint.sh +++ b/10/alpine/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/10/docker-entrypoint.sh b/10/docker-entrypoint.sh index a9190b4055..cd8ce805a4 100755 --- a/10/docker-entrypoint.sh +++ b/10/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/11/alpine/docker-entrypoint.sh b/11/alpine/docker-entrypoint.sh index 78adac6212..e761e26cbc 100755 --- a/11/alpine/docker-entrypoint.sh +++ b/11/alpine/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/11/docker-entrypoint.sh b/11/docker-entrypoint.sh index a9190b4055..cd8ce805a4 100755 --- a/11/docker-entrypoint.sh +++ b/11/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/12/alpine/docker-entrypoint.sh b/12/alpine/docker-entrypoint.sh index 78adac6212..e761e26cbc 100755 --- a/12/alpine/docker-entrypoint.sh +++ b/12/alpine/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/12/docker-entrypoint.sh b/12/docker-entrypoint.sh index a9190b4055..cd8ce805a4 100755 --- a/12/docker-entrypoint.sh +++ b/12/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/9.5/alpine/docker-entrypoint.sh b/9.5/alpine/docker-entrypoint.sh index f87b08bdfe..aad5d4de76 100755 --- a/9.5/alpine/docker-entrypoint.sh +++ b/9.5/alpine/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 84eb98d6f1..1ba1cfc8f7 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/9.6/alpine/docker-entrypoint.sh b/9.6/alpine/docker-entrypoint.sh index f87b08bdfe..aad5d4de76 100755 --- a/9.6/alpine/docker-entrypoint.sh +++ b/9.6/alpine/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index 84eb98d6f1..1ba1cfc8f7 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index a9190b4055..cd8ce805a4 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -284,6 +284,10 @@ _main() { # only run initialization on an empty data directory if [ -z "$DATABASE_ALREADY_EXISTS" ]; then docker_verify_minimum_env + + # check dir permissions to reduce likelihood of half-initialized database + ls /docker-entrypoint-initdb.d/ > /dev/null + docker_init_database_dir pg_setup_hba_conf