Common causes
- Another Docker container is already published on the same port — check with docker ps
- A local service (a dev server, database, or another app) is using the port
- A previous container wasn't properly stopped and is still holding the port
- A system service (like a web server on port 80/443) is running on that port
How to fix it
- Find what's using the port: lsof -i :8080 (Mac/Linux) or netstat -ano | findstr 8080 (Windows)
- Stop the conflicting Docker container: docker ps, then docker stop CONTAINER_ID
- Map to a different host port: docker run -p 8081:8080 myimage (8081 on host → 8080 in container)
- Stop the conflicting local service before starting Docker
Example
$ docker run -p 8080:8080 myapp
docker: Error response from daemon: driver failed programming external connectivity on endpoint myapp: Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use.Another process is already listening on port 8080 on the host
Browse more errors
The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.
