运行Docker for Windows,暴露端口时出错 [英] Running Docker for Windows, Error when exposing Ports
问题描述
我知道关于在Windows上运行Docker有很多问题,但是这个问题是关于在Windows上运行全新的Windows Docker。
就我而言,我正在使用Windows 10 Pro 64位。根据站点,应该支持此版本。
我一直在关注在这里找到的教程:
https://prakhar.me/docker-curriculum/
我也尝试按照官方指南进行操作: https://docs.docker.com/docker-for-windows/
I am aware there are a lot of questions about running Docker on windows, however this question is about running the brand new Docker for Windows, on Windows.
In my case I am using Windows 10 Pro 64 bit. According to the site this version should be supported.
I have been following a tutorial I found here:
https://prakhar.me/docker-curriculum/
I also tried following the official guide of course: https://docs.docker.com/docker-for-windows/
在这两个教程中,尝试使用 -P
参数分配端口或尝试指定端口 -p时,都会收到相同的错误消息8080:5000
:
In both tutorials I get the same error message when trying to assign a port using either the -P
parameter or when trying to specify a port -p 8080:5000
:
在官方指南中,我运行 docker run -d -p 80:80 --name网络服务器nginx
并获得:
In the official guide I run docker run -d -p 80:80 --name webserver nginx
and get:
C:\Program Files\Docker\Docker\Resources\ \bin\docker.exe:来自守护程序的错误响应:驱动程序无法对端点Web服务器上的外部连接进行编程(f9946544e4c6ad2dd9cb8cbccd251e4d48254e86562bd8e6da75c3bd42c7e45a):启动错误userland代理:mkdir /port/tcp:0.0.0.0:80:tcp:172.17.0.2:80:输入/输出错误。
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: driver failed programming external connectivity on endpoint webserver (f9946544e4c6ad2dd9cb8cbccd251e4d48254e86562bd8e6da75c3bd42c7e45a): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:80:tcp:172.17.0.2:80: input/output error.
按照非官方指南,我运行 docker run -p 8888:5000 prakhar1989 / catnip
并得到基本相同的错误:
Following the unofficial guide i run docker run -p 8888:5000 prakhar1989/catnip
and get basically the same error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe:来自守护程序的错误响应:驱动程序无法在端点focused_swartz上编程外部连接(48a0c005779c6e89bf525ead2ecff44a7f092495cd22ef7d19973002963cb232):启动Userland代理时出错:mkdir /port/tcp:0.0.0.0:8888:tcp:172.17.0.2:5000:输入/输出错误。
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: driver failed programming external connectivity on endpoint focused_swartz (48a0c005779c6e89bf525ead2ecff44a7f092495cd22ef7d19973002963cb232): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8888:tcp:172.17.0.2:5000: input/output error.
如果我不尝试分配端口,容器将运行,但是我不知道如何访问它。
If I don't try to assign a port the container will run, but then I don't know how to access it.
我使用的Docker版本运行:
The docker version I am running:
- Docker版本1.12.3,内部版本6b644ec`
- docker-compose版本1.8。 1,构建004ddae`
- docker-machine.exe版本0.8.2,构建e18a919`
任何帮助将不胜感激。谢谢。
Any help would be very appreciated. Thank you.
推荐答案
这是由端口编号冲突引起的:github问题在这里 https://github.com/docker/compose/issues/3277
This is caused by a port numbering conflict: github issue here https://github.com/docker/compose/issues/3277
基本上正在使用该端口!重置成功的原因是因为它清除了其他映射。
Essentially the port is in use! The reason resetting worked is because it wiped other mappings off.
这篇关于运行Docker for Windows,暴露端口时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!