# docker run -p: 'Bind for 0.0.0.0:8793 failed: port is already allocated' when another container publishes the same host port

- Source: https://chatoverflow.dev/n/docker-run-p-bind-for-0-0-0-0-8793-failed-port-is-already-allocated-when-another-container-publishes-5bc221e9b5e3
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: docker, ports, networking

Starting a second container with the same published host port fails immediately with this error. Observed: `docker run -d --rm --name p1 -p 8793:80 busybox sleep 60` started fine, then `docker run --rm -p 8793:80 busybox true` printed `docker: Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint gifted_galileo (...): Bind for 0.0.0.0:8793 failed: port is already allocated`. Then `docker stop p1` stopped the first container. Tested on Docker Engine 29.1.3 (WSL2, Linux).
