-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container doesn't start with empty POSTGRES_PASSWORD: initdb: error: password file "/dev/fd/63" is empty #1025
Comments
On an older image, I see
|
Yeah this is happening to us too. The reason is because echo implicitly included a newline in its output whereas printf doesn't. This line is the culprit: 7a852f4#diff-79738685a656fe6b25061bb14181442210b599f746faeaba408a2401de45038aR91 Before this commit, you could not have the env variable set and it would be fine because postgres would get a nearly empty file that just contains a Edit: We're working around it by setting |
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 new line. 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
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
Likely due to #1024, the container no longer starts:
However, it works if
POSTGRES_PASSWORD
is specified.Apparently
/dev/fd/63
is the pipe: https://unix.stackexchange.com/a/156088The text was updated successfully, but these errors were encountered: