Interview Prep/Docker/Networking, DNS and Compose

`docker compose up` error: `Bind for 0.0.0.0:80 failed: port is already allocated` while nothing seems to listen.

IntermediateTroubleshootingNetworking, DNS and Compose
Answer

Likely causes → A stale docker-proxy or a stopped container still holding the mapping, or another Compose project.

Diagnose →

docker ps -a --filter publish=80
sudo ss -tlnp | grep ':80 '
ps aux | grep docker-proxy

Fix → Remove the old container (docker rm -f), docker compose down --remove-orphans, restart Docker if the proxy is orphaned.

Prevent → Use --remove-orphans.

All Docker questions Roadmap: Docker & containers

More on Networking, DNS and Compose