I’m trying to run a PostgreSQL container in Docker on my MacBook Air, but I’m getting the following error:
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5432 -> 127.0.0.1:0: listen tcp 0.0.0.0:5432: bind: address already in use
Additional information: • OS: macOS (MacBook Air) • Docker: Latest version installed via Homebrew • PostgreSQL: Installed via Homebrew (brew install postgresql)
Any help is greatly appreciated! 🙏
docker ps -a. If you do, then remove the stopped container usingdocker rm <container name>.