UPDATE
I was wrong. The entrypoint just appends a line, it will not reset the file, but it is on a volume so when you commit the container, that will not be committed ince that is not part of the container.
The rest of my old answer is correct. You should not change the file, but use POSTGRES_HOST_AUTH_METHOD, but the bets if you don’t trust in every host without a password unless you are just testing on your local computer.
My original answer is below
The entrypoint overwrites that file every time you start the container. Please read the description of that image for solutions and more details
Quote:
POSTGRES_HOST_AUTH_METHODThis optional variable can be used to control the
auth-methodforhostconnections foralldatabases,allusers, andalladdresses. If unspecified thenscram-sha-256password authentication is used (in 14+;md5in older releases). On an uninitialized database, this will populatepg_hba.confvia this approximate line:echo "host all all all $POSTGRES_HOST_AUTH_METHOD" >> pg_hba.conf
You shouldn’t do that. The right way is to use a Dockerfile and create a custom image so every change is documented and you can rebuild the image everywhere.