docker run \--name some-postgis \-ePOSTGRES_PASSWORD=mysecretpassword \-ePOSTGRES_USER=mydbuser \-p5432:5432 \-v /path/to/pgdata:/var/lib/postgresql/data \-d kartoza/postgis:10.5-2.4
data下的pg_hba.conf文件
远程访问配置
# TYPE DATABASE USER ADDRESS METHOD# "local" is for Unix domain socket connections onlylocal all all md5
# IPv4 local connections:host all all 127.0.0.1/32 md5
# IPv6 local connections:host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the# replication privilege.local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
host all all all scram-sha-256