简体   繁体   中英

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM