无法通过intellij和quarkus访问docker postgres镜像?

时间:2019-10-02 13:52:26

标签: java postgresql docker quarkus

我通过命令行运行docker postgres容器:

docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=passme -d postgres

但是在IntelliJ中我无法访问此容器 出现以下错误信息:

[08001] Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
java.net.ConnectException: Connection refused: connect.

您知道任何问题吗,也许是端口问题?

0 个答案:

没有答案