Using Docker to launch web app, can't connect to Postgresql DB?

后端 未结 4 1354
礼貌的吻别
礼貌的吻别 2021-02-06 10:10

I received the following error when trying to write session data using Tomcat\'s PersistentManager to a Postgres DB running on my local machine:

SEVERE: A SQL e         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 10:31

    I had to expose port with -p 5432:5432:

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

提交回复
热议问题