Docker app for macOS uses port 8080. How can I change that?

I’ve noticed the Docker app for macOS uses port 8080. However, this causes issues for other processes which expect to use 8080.

lsof -i :8080

COMMAND     PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
com.docke 63800 myuser  128u  IPv6 0xaedf71127991fd8f      0t0  TCP *:http-alt (LISTEN)

Is there a way I can change which port the Docker app for macOS uses? An ENV variable, or command-line flag?


  • macOS Montery (Intel) Version 12.4 (21F79)
  • Docker Desktop 4.10.1 (82475)
  • Engine: 20.10.17
  • Compose: 1.29.2
  • Credential Helper: v0.6.4
  • Kubernetes: v1.24.1
  • Snyk: v1.827.0

Are you sure this is not a container you’ve got running, that publishes this port? My Mac (M1) yields no results for that command. Desktop 4.9.1 (81317). Same for 4.10.1 (82475).

I tried too and I agree with @avbentem so I just want to share some ideas why you could see that port 8080 is used even if you run docker ps or docker ps -a and you can’t see any containers.

  1. If you run Kubernetes on Docker Desktop, Kubernetes containers are not visible by default. However, Kubernetes itself will not use port 8080 but some services could. If you want to enable showing Kubernetes containers, go to the Kubernetes settings and aneble “Show system containers (advanced)”. It would probably not help since you could just list kubernetes services and those are not visible in the list of containers, but at least you know what containers are running on your machine.
  2. Extensions can also use ports. For example when you install “Portainer”, itt will use port 8000, 9000 and 9443 on the local IP 127.0.0.1. Extension containers are also hidden by default if I remember correctly. If you want to see the extension containers, go the the Extensions settings below “Software updates” and “Kubernetes” and enable “Show Docker Extensions system containers”

Yes, I believe @avbentem and @rimelek are correct. Before seeing your replies I clicked “Clean / Purge data” and the port was freed up.

It was probably a running container I was unaware of.

Thanks!