Connecting to Postgresql in a docker container from outside

后端 未结 14 2029
太阳男子
太阳男子 2020-11-29 14:42

I have Postgresql on a server in a docker container. How can I connect to it from the outside, that is, from my local computer? What setting should I apply to allow that?

14条回答
  •  广开言路
    2020-11-29 15:16

    first open the docker image for the postgres

    docker exec -it 
    

    then u will get the root --root@868594e88b53:/# it need the database connection

    psql postgresql://:@postgres:5432/
    

提交回复
热议问题