PlainError

docker: Error response from daemon: Bind for [IP]:8080 failed: port is already allocated

Last checked 2026-11-11 · 3 fixes · reviewed answer

TL;DRDocker cannot start the container because another process is already using TCP port 8080 on the host.

Most likely cause: A different Docker container or another program on the host is already listening on port 8080

Try first: Check which process is using port 8080 (ss -tlnp | grep 8080 (Linux) or netstat -ano | findstr :8080 (Windows))

Likely causes

  1. A different Docker container or another program on the host is already listening on port 8080most likely
  2. A previous container was not stopped cleanly and still holds the portpossible

How to fix it

Safest first: SafeChanges settingsDangerous
  1. Check which process is using port 8080Safe

    Run a command to list the program currently bound to port 8080.

    ss -tlnp | grep 8080  (Linux) or netstat -ano | findstr :8080 (Windows)
  2. Stop the conflicting container or processChanges settings

    If the output shows a Docker container, stop it with docker stop. If it is another program, close or reconfigure that program.

    docker stop <container-name-or-id>
  3. Restart the original containerChanges settings

    Run the docker run command again after freeing the port.

    docker run ...

If that didn't fix it

Run 'docker ps -a' to list all containers and their published ports, then compare with the port shown in the error.

When to see a technician

If you are running this in a shared or production environment and cannot identify the conflicting service, ask your system administrator for help.

Quick answers

What does docker: Error response from daemon: Bind for [IP]:8080 failed: port is already allocated mean?
Docker cannot start the container because another process is already using TCP port 8080 on the host.
What causes docker: Error response from daemon: Bind for [IP]:8080 failed: port is already allocated?
A different Docker container or another program on the host is already listening on port 8080. (most likely) A previous container was not stopped cleanly and still holds the port. (possible)
How do I fix docker: Error response from daemon: Bind for [IP]:8080 failed: port is already allocated?
Try these in order, safest first: 1. Check which process is using port 8080. 2. Stop the conflicting container or process. 3. Restart the original container.
What if that didn't fix it?
Run 'docker ps -a' to list all containers and their published ports, then compare with the port shown in the error.
When should I see a technician?
If you are running this in a shared or production environment and cannot identify the conflicting service, ask your system administrator for help.
Did this fix it? Report a problem

Related errors

All Coding errors →