Bagaimana untuk mengkonfigurasi Windows Defender Firewall untuk berkongsi pemacu dalam Docker?

Docker menghalang perkongsian pemacu dan membentangkan dialog Firewall yang dikesan.

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

To prevent the above, set up the Windows Defender Firewall to allow the port 445 TCP connection.

By default the Windows Defender Firewall blocks TCP port 445 connections.

The following shows one way to configure the Windows Defender Firewall.

 

  1. Go to Windows Security Dashboard
    Windows Security Dashboard

     

  2. Click on Firewall & network protection
    Firewall & network protection

    Nota: Private network is active

     

  3. Choose Advanced settings and then Inbound Rules
    Windows Defender Firewall with Advanced Security - Inbound Rules

     

  4. Find TCP IB_BLOCK and double click on it.

     

  5. Choose the advanced tab and uncheck private in Profiles (Private matches the active network profile).  Klik OK.

     

  6. In Docker, go to Settings -> Shared Drives, and check the drive that you would like to share.