How to set Windows ...
Notifications
Clear all

How to set Windows Firewall to allow Docker for Windows to share drive

RSS

(@abhijith)
Noble Member
加入ed: 2 years ago
帖子:1350
14/05/2021 10:51 am

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

This works fine when Windows Firewall is down. But when it’s up, I get the following error:

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

Quote
(@anamika)
Noble Member
加入ed: 2 years ago
Posts: 1381
14/05/2021 11:09 am

This is simple, you don't actually need to share the C drive but only reinstall the File and Print sharing service on the Hyper-V virtual network card.

Also if you’re facing any problem or restrictions on your network profiles, consider changing the default "unidentified network" for the "vEthernet (DockerNAT)" card to private via this PowerShell command.

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

ReplyQuote
(@anamika)
Noble Member
加入ed: 2 years ago
Posts: 1381
15/05/2021 10:31 am

when you create docker machine, you can nominate the memory size:

docker-machine create -d virtualbox --virtualbox-memory 4096 default

or

docker-machine stopVBoxManage modifyvm default --cpus 2VBoxManage modifyvm default --memory 4096docker-machine start

ReplyQuote
Share:
Baidu