Docker 无法启动另一进程使用的Windows容器:HNS文件

Docker 无法启动另一进程使用的Windows容器:HNS文件,docker,docker-compose,Docker,Docker Compose,我正在尝试使用docker compose构建一个a,其中两个容器通过以下网络相互连接: networks: nd: external: name: nat 最近,我在启动应用程序时开始收到以下错误: ERROR: app: Cannot start service app: failed to create endpoint app on network nat: HNS failed with error : The process cannot access

我正在尝试使用docker compose构建一个a,其中两个容器通过以下网络相互连接:

networks:
  nd:
    external:
      name: nat
最近,我在启动应用程序时开始收到以下错误:

 ERROR: app: Cannot start service app: failed to create endpoint app on
 network nat: HNS failed with error : The process cannot access the file 
 because it is being used by another process.
 ERROR: Encountered errors while bringing up the project.

我曾尝试使用Microsoft的清理网络,并已删除并重新安装Docker,但错误仍然存在

我遇到了这个问题,因为我正在将端口映射到正在使用的主机端口。我敢说还有其他原因,但希望这是你的

检查您是否使用过Linux容器,它不会列在命令“docker ps-a”中。他们有不同的列表和不同的虚拟机

在我的例子中,主机端口正在使用。我更改了它并得到了解决

这就是我在windows中解决问题的方法 控制面板->网络和互联网->网络连接 我启用了2个Hyper-V虚拟以太网适配器。禁用其中一个修复了我的问题。 似乎另一个正在使用hns.data文件,这就是为什么另一个给出了错误,试试看。希望它能帮助其他人;)