From f1bc8782e7e57cc403d0b32c0e24599535859f76 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 17 Feb 2020 12:56:07 -0800 Subject: [PATCH] Clarify that "POSTGRES_PASSWORD" should be non-empty (Assuming "POSTGRES_HOST_AUTH_METHOD" is not set to the "trust" value which does not require passwords.) --- 10/alpine/docker-entrypoint.sh | 13 +++++++------ 10/docker-entrypoint.sh | 13 +++++++------ 11/alpine/docker-entrypoint.sh | 13 +++++++------ 11/docker-entrypoint.sh | 13 +++++++------ 12/alpine/docker-entrypoint.sh | 13 +++++++------ 12/docker-entrypoint.sh | 13 +++++++------ 9.5/alpine/docker-entrypoint.sh | 13 +++++++------ 9.5/docker-entrypoint.sh | 13 +++++++------ 9.6/alpine/docker-entrypoint.sh | 13 +++++++------ 9.6/docker-entrypoint.sh | 13 +++++++------ docker-entrypoint.sh | 13 +++++++------ 11 files changed, 77 insertions(+), 66 deletions(-) diff --git a/10/alpine/docker-entrypoint.sh b/10/alpine/docker-entrypoint.sh index f53fa6134a..d0ec89d0cf 100755 --- a/10/alpine/docker-entrypoint.sh +++ b/10/alpine/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/10/docker-entrypoint.sh b/10/docker-entrypoint.sh index 406a971cfc..8536cf2f21 100755 --- a/10/docker-entrypoint.sh +++ b/10/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/11/alpine/docker-entrypoint.sh b/11/alpine/docker-entrypoint.sh index f53fa6134a..d0ec89d0cf 100755 --- a/11/alpine/docker-entrypoint.sh +++ b/11/alpine/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/11/docker-entrypoint.sh b/11/docker-entrypoint.sh index 406a971cfc..8536cf2f21 100755 --- a/11/docker-entrypoint.sh +++ b/11/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/12/alpine/docker-entrypoint.sh b/12/alpine/docker-entrypoint.sh index f53fa6134a..d0ec89d0cf 100755 --- a/12/alpine/docker-entrypoint.sh +++ b/12/alpine/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/12/docker-entrypoint.sh b/12/docker-entrypoint.sh index 406a971cfc..8536cf2f21 100755 --- a/12/docker-entrypoint.sh +++ b/12/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/9.5/alpine/docker-entrypoint.sh b/9.5/alpine/docker-entrypoint.sh index 8539acd673..de45d91145 100755 --- a/9.5/alpine/docker-entrypoint.sh +++ b/9.5/alpine/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index ae5de79e98..2a57e1044d 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/9.6/alpine/docker-entrypoint.sh b/9.6/alpine/docker-entrypoint.sh index 8539acd673..de45d91145 100755 --- a/9.6/alpine/docker-entrypoint.sh +++ b/9.6/alpine/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index ae5de79e98..2a57e1044d 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1 diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 406a971cfc..8536cf2f21 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -88,7 +88,7 @@ docker_init_database_dir() { } # print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust' +# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' # print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' # assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] docker_verify_minimum_env() { @@ -110,12 +110,13 @@ docker_verify_minimum_env() { # The - option suppresses leading tabs but *not* spaces. :) cat >&2 <<-'EOE' Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD for the superuser. Use - "-e POSTGRES_PASSWORD=password" to set it in "docker run". + You must specify POSTGRES_PASSWORD to a non-empty value for the + superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all connections - without a password. This is *not* recommended. See PostgreSQL - documentation about "trust": + You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all + connections without a password. This is *not* recommended. + + See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html EOE exit 1