Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error Permission denied

I am running the latest Docker CE, 17.09, under Windows 10 Pro, and using two different examples am getting Permission denied.

Docker site example: docker run -d -p 80:80 --name webserver nginx

AWS site Docker example: docker run -p 80:80 hello-world

both returned the same error.

docker: Error response from daemon: driver failed programming external connectivity on endpoint XXXXX: Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error Permission denied.

like image 555
Alz Avatar asked Oct 02 '17 20:10

Alz


2 Answers

I solved my issue on Windows 10 Pro, turned out I had the World Wide Web Publishing Service turned on somehow. Took me a while to find that, after noting via netstat -a -n that I had a :80 listener somewhere/somehow. Silly me. Shut it down, and I was fine with port 80.

like image 144
Alz Avatar answered Sep 18 '22 12:09

Alz


Change the port using these commands as follow:

docker container ls //show the container infos, note the ports info.  docker stop webserver  docker rm webserver  //shut down currently webserver  docker run -d -p 8080:80 --name webserver nginx (or 8000:80) 

Finally, let's input localhost:8080 to show whether the connection is successful in the browser.

enter image description here

like image 25
Alan Li Avatar answered Sep 21 '22 12:09

Alan Li