Can't replace pg_hba.conf when create my custom container

Is it a task at school? If you are just practicing that’s fine, otherwise I answered in the other topic how you should trust (usually you should not) in all hosts

Since I gave you the wrong reason why the changes were lost, I updated my answer.

An error message (docker logs CONTAINERNAME) and the whole content of the config would be helpful, but I guess you copied the file with wrong permissions. Make sure the postgresql user can read and write it but nobody else.

8.0K -rw-------  1 postgres postgres 4.5K Feb 15 19:06 pg_hba.conf