我在我的Mac上本地運行postgres.app,並希望我的本地docker容器能夠連接到它。我該如何做到最好? 我發現這篇文章建議使用--add-host標誌(Host port with DB to Docker container)將Docker主機的IP地址傳遞給容器。但是,筆記本電腦的IP地址經常更改。沒有一個更簡單的方法來做到這一點?沒有簡單的方法來打開本地端口到容器?
我在與PostgreSQL的問題 只要我跑 psql -h localhost
我得到 psql: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 543
我試圖讓postsql和postgis一起工作,但仍然遇到同樣的問題。 使用: 的PostgreSQL 9.2.3(postgres.app) 當我運行: CREATE EXTENSION postgis;
ERROR: could not access file "$libdir/postgis-2.0": No such file or directory
我也得到了同樣的錯誤,當我運行