Docker 运行 失败,来自守护程序的错误响应
Docker run failed with Error response from daemon
我只是运行下面的命令:
docker run -d -p 80:80 --name webserver nginx
并且在提取所有图像后 returns 这个错误:
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).
这是我的 docker 版本信息:
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
如何解决这个问题?
您没有提供 Docker 版本、系统或 docker 进程 运行 等信息,所以我假设最可能的情况。
输出包含:Failure EADDRINUSE
。这意味着端口 80
被其他东西使用了。您可以使用 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.
我只是运行下面的命令:
docker run -d -p 80:80 --name webserver nginx
并且在提取所有图像后 returns 这个错误:
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).
这是我的 docker 版本信息:
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
如何解决这个问题?
您没有提供 Docker 版本、系统或 docker 进程 运行 等信息,所以我假设最可能的情况。
输出包含:Failure EADDRINUSE
。这意味着端口 80
被其他东西使用了。您可以使用 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.