Skip to content

Conversation

stanhu
Copy link
Contributor

@stanhu stanhu commented Dec 22, 2022

#1024 converted all echo calls to printf, but this change causes the password file used by initdb to be blank rather than contain a single newline. As a result, initdb will fail to start with an empty value with the error:

initdb: error: password file "/dev/fd/63" is empty 

POSTGRES_PASSWORD can be blank if POSTGRES_HOST_AUTH_METHOD=trust is used. This change adds a newline to restore the original behavior.

Closes #1025

docker-library#1024 converted all `echo` calls to `printf`, but this change causes the password file used by `initdb` to be blank rather than contain a single newline. As a result, `initdb` will fail to start with an empty value with the error: ``` initdb: error: password file "/dev/fd/63" is empty ``` `POSTGRES_PASSWORD` can be blank if `POSTGRES_HOST_AUTH_METHOD=trust` is used. This change adds a newline to restore the original behavior. Closes docker-library#1025
@stanhu stanhu force-pushed the sh-add-newlines-to-initdb branch from 1ffe3ab to 41bd7bf Compare December 22, 2022 21:40
@tianon tianon merged commit ff5f92b into docker-library:master Dec 22, 2022
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Dec 22, 2022
Changes: - docker-library/postgres@ff5f92b: Merge pull request docker-library/postgres#1026 from stanhu/sh-add-newlines-to-initdb - docker-library/postgres@41bd7bf: Add newline to `POSTGRES_PASSWORD` file for initdb
@tianon
Copy link
Member

tianon commented Dec 22, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants