docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.14k stars 1.11k forks source link

Set random password if POSTGRES_PASSWORD was not provided #1199

Open EugenKon opened 4 months ago

EugenKon commented 4 months ago

Actually this is not required to provide this password. In pg_hba.conf file by default we trust connections via socket, thus user in any time can login and ALTER ROLE postgres. So this is secure and less error prone solution.