PostgreSQL Docker Image Overview

docker exec -it postgresql psql -U postgres

Troubleshooting

$ docker run --name postgresql bitnami/postgresql:latest

Unable to find image 'bitnami/postgresql:latest' locally
latest: Pulling from bitnami/postgresql
f6a677ffb3c0: Pull complete
Digest: sha256:4237ea262ad7aa0fdbb5f04015581cc6372aecb6741cce97ddaca3fe51ebeceb
Status: Downloaded newer image for bitnami/postgresql:latest
postgresql 02:52:27.37 INFO ==>
postgresql 02:52:27.37 INFO ==> Welcome to the Bitnami postgresql container
postgresql 02:52:27.37 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
postgresql 02:52:27.37 INFO ==> NOTICE: Starting August 28th, 2025, only a limited subset of images/charts will remain available for free. Backup will be available for some time at the 'Bitnami Legacy' repository. More info at https://github.com/bitnami/containers/issues/83267
postgresql 02:52:27.37 INFO ==>
postgresql 02:52:27.39 INFO ==> ** Starting PostgreSQL setup **
postgresql 02:52:27.42 INFO ==> Validating settings in POSTGRESQL_* env vars..
postgresql 02:52:27.43 ERROR ==> The POSTGRESQL_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development.
postgresql 02:52:27.43 ERROR ==> The POSTGRESQL_PASSWORD environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development.

Workaround:

docker rm postgresql

docker run -d --name postgresql -e POSTGRES_PASSWORD=welcome -p 5432:5432 bitnami/postgresql:latest