Loading...
Loading...
Error response from daemon: driver failed programming external connectivity: Bind for 0.0.0.0:3000 failed: port is already allocatedThe port you're trying to bind your Docker container to is already in use by another process on your host machine — either another container or a local process.
Identify what's using the port and stop it.
# On Linux / Mac — find the process
lsof - i : 3000
# or
sudo ss - tulpn | grep : 3000
# Kill it
kill - 9 <PID>
# On Windows(PowerShell)
netstat - ano | findstr : 3000
taskkill / PID<PID> / FStop all Docker containers that might be holding the port.
# Stop all running containers
docker stop $(docker ps - q)
# Or stop a specific container
docker ps # find the container ID
docker stop <container_id>Map to a different host port in your docker-compose.yml.
# docker - compose.yml
services:
app:
ports:
- "3001:3000" # host:container — use 3001 instead of 3000