我正在尝试在Windows 10 Pro(最新)下启动jenkinsci/blueocean容器.我正在运行脚本:
I'm trying to start a jenkinsci/blueocean container under Windows 10 Pro (latest). I'm running a script:
docker run ^ --rm ^ -u root ^ -d ^ -p 8080:8080 ^ -p 50000:50000 ^ -v D:/docker/jenkins/volumes/jenkins-data:/var/jenkins_home ^ -v D:/docker/jenkins/volumes/docker.sock:/var/run/docker.sock ^ -v D:/docker/jenkins/volumes/home:/home ^ jenkinsci/blueocean此操作失败,并显示以下消息:
This fails with the following message:
docker: Error response from daemon: driver failed programming external connectivity on endpoint elastic_kare: Error starting userland proxy: Bind for 0.0.0.0:50000: unexpected error Permission denied如果我忽略端口50000的绑定,它可以正常工作,但是我需要50000端口才能与主机上的从属进行通信.
If I leave out the binding of port 50000 it works fine, but I need the 50000 port to communicate with the slaves on the host.
将50000绑定到另一个端口无济于事.根据netstat -an,该端口未使用.尝试以管理员身份运行脚本无济于事.
Binding 50000 to another port doesn't help. The port is not in use, according to netstat -an. Trying to run the script as Administrator didn't help.
这里可能是什么问题?
更新:我重新启动了笔记本电脑,并将Docker桌面也更新到了最新版本.
update: I restarted my laptop and updated Docker Desktop to the latest version as well.
update2:重新启动笔记本电脑后,我也重新启动了Docker(几次).无济于事.
update2: after restarting laptop I restarten Docker (several times) as well. To no avail.
update3:关闭Windows防火墙并不能解决问题.
update3: shutting down the Windows Firewall did not solve the problem.
推荐答案如果您在Windows上运行Docker,则它将使用Hyper-V-我发现Hyper-V保留了大量端口-您可以通过运行以下命令找出答案:
If you're running Docker on Windows then it will be using Hyper-V - I've found that Hyper-V reserves a bunch of ports - you can find out by running this:
netsh interface ipv4 show excludedportrange protocol=tcp在我的机器上,我可以看到它保留了端口50000.要释放此端口,我禁用了Hyper-V:
On my machine I could see it had reserved port 50000. To free this port up I disabled Hyper-V:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V重启后,我保留了端口50000:
After the reboots, I reserved port 50000:
netsh int ipv4 add excludedportrange protocol=tcp startport=50000 numberofports=1然后再次启用Hyper-V:
Then enabled Hyper-V again:
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All恢复后,我可以在Windows的Docker中运行Jenkins:
When it came back up I could run Jenkins in Docker on Windows:
docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts更多推荐
Docker端口绑定失败.为什么“权限被拒绝"?
发布评论