Docker & Postgres: Failed to bind tcp 0.0.0.0:5432 address already in use

后端 未结 5 1203
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-30 22:38

Problem

I\'m trying to start postgres in a docker container on my Mac, but I keep getting the following error message

docker: Error response from da

5条回答
  •  感动是毒
    2021-01-30 22:53

    If you execute lsof -i :5432 on the host you can see what process is bound to the port.

    Some instance of Postgres is running. You can execute kill to kill it if you want. You can also use 5432 instead of 5432:5432 in your docker command or docker-compose file and let docker choose the host port automatically.

提交回复
热议问题