Windows防火墙的设置,以允许Docker for Windows共享驱动器 [英] Settings to Windows Firewall to allow Docker for Windows to share drive

查看:170
本文介绍了Windows防火墙的设置,以允许Docker for Windows共享驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows防火墙阻止了我允许Windows的Docker在Windows 10机器上共享C:的尝试。

Windows Firewall is blocking my attempt to allows Docker for Windows to share C: on windows 10 machine.

关闭Windows防火墙后工作正常。当我打开

Works fine when Windows Firewall off. When its on I get


防火墙阻止Windows和
容器之间的文件共享。请参阅文档以获取更多信息。

A firewall is blocking file Sharing between Windows and the containers. See documentation for more info.

文档说


您不需要在任何其他网络上打开端口445。默认情况下,
允许从
10.0.75.2(虚拟机)到10.0.75.1端口445(Windows主机)的连接。

You do not need to open port 445 on any other network. By default, allow connections to 10.0.75.1 port 445 (the Windows host) from 10.0.75.2 (the virtual machine).

我被谷歌搜索,试图找到该怎么做-有人可以建议吗?

I am "googled out" on trying to find how to do that - can someone advise?

推荐答案

仅此解决方案可帮助我:

Only this solution helps me:


  • 转到Hyper-V管理器->虚拟交换机管理器-> DockerNAT->连接类型:从内部到私有,应用,更改回内部,应用

  • 重新启动MobyLinuxVM

  • 重新启动Docker

  • 设置Docker网络配置文件为私有。在PowerShell中以管理员身份运行命令

    Set-NetConnectionProfile -interfacealias vEthernet(DockerNAT) -NetworkCategory Private

  • 在DockerNAT连接上为Microsoft网络重置文件和打印机共享

  • 转到Docker->设置->共享驱动器并共享C:

  • Go to Hyper-V Manager -> Virtual Switch Manager -> DockerNAT -> Connection Type: change from internal to private, apply, change back to internal, apply
  • Restart MobyLinuxVM
  • Restart Docker
  • Set Docker network profile to 'Private'. Run command in PowerShell as admin
    Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
  • Reset File and Printer Sharing for Microsoft Networks on DockerNAT connection
  • Go to Docker -> Settings -> Shared Drives and share C:

这篇关于Windows防火墙的设置,以允许Docker for Windows共享驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆