Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker run failed with Error response from daemon

I simply run the following command:

docker run -d -p 80:80 --name webserver nginx

and after pulling all images returns this error:

docker: Error response from daemon: driver failed programming external connectivity on endpoint webserver (ac5719bc0e95ead1a4ec6b6ae437c4c0b8a9600ee69ecf72e73f8d2d12020f97): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE).

Here is my docker Version info:

Client:
Version:      1.12.0
API version:  1.24
Go version:   go1.6.3
Git commit:   8eab29e
Built:        Thu Jul 28 21:15:28 2016
OS/Arch:      darwin/amd64

Server:
Version:      1.12.0
API version:  1.24
Go version:   go1.6.3
Git commit:   8eab29e
Built:        Thu Jul 28 21:15:28 2016
OS/Arch:      linux/amd64

How to fix this?

like image 496
beingjungshahi Avatar asked Aug 13 '16 08:08

beingjungshahi


People also ask

Why is my Docker Daemon not running?

Conclusion. The Docker daemon is a backend service of Docker that controls the Docker container. To resolve the Docker daemon is not running error, you first need to verify if the service of Docker Desktop is running or not. If the service is running then update the WSL package.


1 Answers

You didn't provide informations such as Docker version, system or docker processes running so I assume the most likely situation.

The output contains: Failure EADDRINUSE. It means that port 80 is used by something else. You can use lsof -i TCP:80 to check which process is listening on that port. If there is nothing running on the port, it might be some issue with Docker. For example the one with not releasing ports immediately.

like image 116
Maciej Małecki Avatar answered Sep 23 '22 03:09

Maciej Małecki