Docker for Windows Troubleshooting - NCIOCPL/cgov-digital-platform GitHub Wiki
unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Sometimes Docker "forgets" how to use the shared drives.
- In the system tray, right-click on the Docker icon.
- Choose "Settings"
- Go to the "Shared Drives" tab.
- Clear the checkbox next to drive C.
- Click Apply.
- Set the checkbox next to drive C.
- Click Apply.
If at this point you receive a message stating that a firewall is blocking the connection, proceed to the troubleshooting steps below for "error while creating mount source path '/host_mnt/c/"
This is probably a networking issue. (Docker for Windows mounts Windows file shares over a network connection from 10.0.75.1 to 10.0.75.2)
- Launch the firewall app (from a command prompt, you can run wf.msc)
- Filter the firewall rules to just show the "File and Printer Sharing" group.
- Look for rules on port 445
- Generally, these rules seem to apply to networks with the Private network profile.
- Open an elevated powershelll prompt
- Run the command:
Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
- https://docs.docker.com/docker-for-windows/#firewall-rules-for-shared-drives
- https://stackoverflow.com/questions/42203488/settings-to-windows-firewall-to-allow-docker-for-windows-to-share-drive/43904051#43904051
- https://blog.olandese.nl/2017/05/03/solve-docker-for-windows-error-a-firewall-is-blocking-file-sharing-between-windows-and-the-containers/