I am writing DockerFile for PostgreSQL. The image is building successfully, but container not able to start up saying not able to access the pg_hba.conf file,no such file. I am providing data directory with -D switch in initdb command to create the PG related data and config files in different dorectory. But when i am manually running the same command in a container , its running successfully.
Any pointers what could be the issue ?