Another solution to know the location of postgresql.conf is to start psql and type
\show all
Then search for the value of 'config_file'.
For my docker configuration, this will be /var/lib/postgresql/data/postgresql.conf
then I can connect to Docker with
docker exec -it postgres bash -c "export TERM=xterm-256color ; bash"
and view its content with
cat /var/lib/postgresql/data/postgresql.conf