Fill these in once
- See what is holding the port
lsof -i :8080If a docker process shows up, it's an old container. Anything else is a normal program.
- Find the container using it
docker ps --filter "publish=8080" - Stop that container
docker stop $(docker ps -q --filter "publish=8080")Then start yours again. Or, to keep both, give yours another outside port, like -p 8081:{{port}}.
Check it worked
- Check the port is free
docker ps --filter "publish=8080"The list should be empty.
- See what is holding the port
sudo lsof -i :8080If a docker process shows up, it's an old container. Anything else is a normal program.
- Find the container using it
docker ps --filter "publish=8080" - Stop that container
docker stop $(docker ps -q --filter "publish=8080")Then start yours again. Or, to keep both, give yours another outside port, like -p 8081:{{port}}.
Check it worked
- Check the port is free
docker ps --filter "publish=8080"The list should be empty.
- See what is holding the port
netstat -ano | findstr :8080The last number on each line is the program's ID.
- Find the container using it
docker ps --filter "publish=8080" - Stop that container
docker stop (docker ps -q --filter "publish=8080")Then start yours again. Or, to keep both, give yours another outside port, like -p 8081:{{port}}.
Check it worked
- Check the port is free
docker ps --filter "publish=8080"The list should be empty.