I have this issue in context Docker when execute .yml file. this file execute
initdb: error: directory “/var/lib/postgresql/data” exists but is not empty initdb: hint: If you want to create a new database system, either remove or empty the directory “/var/lib/postgresql/data” or run initdb with an argument other than The database cluster will be initialized with locale “en_US.utf8”. The default database encoding has accordingly been set to “UTF8”. The default text search configuration will be set to “english”. Data page checksums are disabled.
I deleted all the files inside ./java/postgres_data host machine and navegate to /docker-entrypoint-initdb.d