docker - 在网络 nat : hnsCall failed in Win32: The process cannot access the file 上创建端点失败

标签 docker dockerfile

我正在尝试运行以下 docker 命令(最新的 Win10 Fall 2018 更新,最新的 docker 版本 2.0):

docker run -d -p 1433:1433 -e sa_password=Test_123 -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer

但它失败并出现以下错误:

Error response from daemon: failed to create endpoint unruffled_wozniak on network nat: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).

我尝试了以下方法:

  • 重启守护进程
  • docker system prune -a
  • 重启机器
  • 重启 HNS 服务
  • 重新安装 docker
  • 从 Windows 功能中禁用容器和 Hyper-V

没有任何效果。有什么建议吗?

最佳答案

不确定这样做是否明智,但我检查了该端口未与其他应用程序一起使用,但仍然出现错误。

这已经为我解决了几次问题。在管理 PowerShell 控制台中,运行以下命令:

Stop-Service docker
Stop-service hns
Start-service hns
Start-Service docker
docker network prune

部分来自 this post .

关于docker - 在网络 nat : hnsCall failed in Win32: The process cannot access the file 上创建端点失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53836103/

相关文章:

linux - 通过 docker 安装 Tensorflow 时出错

docker - Docker-compose拉出两个图像,一个应用程序,并且流畅,但没有日志发送到stdout进行流畅

docker - 创建 Dockerfile - docker 在每个新构建上从头开始

带有 rsync 的 docker-machine

docker - Docker容器中的热重载在一段时间后停止工作

google-app-engine - 如何在App Engine自定义运行时Dockerfile中连接到SQL实例?

docker - 如何将文件路径传递到Docker文件中

docker - 容器化应用程序执行本地脚本?

docker - 我是否需要 `docker commit` 才能将图像推送到 docker 图像注册表(例如 docker hub)?

docker - 如何自动停止docker容器?