dockerubuntu

Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use


I am trying to follow a tutorial for Docker beginners (https://docs.docker.com/get-started/)

When I try to run this command: $ docker run -d -p 80:80 docker/getting-started

I get this Error:

docker: Error response from daemon: driver failed programming external connectivity on endpoint suspicious_murdock (863f389a032ea76d187c4387701b9eb0b6d4de4d0a9ed414616fa6b4715346ab): Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use.

I tried removing all the dockers docker rm -fv $(docker ps -aq) but it did nothing.

What can I do?


Solution

  • Or you can use a different port like docker run -d -p 8080:80 docker/getting-started. This way you do not need to stop the apache2 running on the host.