Docker for Windows Troubleshooting - NCIOCPL/cgov-digital-platform GitHub Wiki

Cannot start service :

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.

  1. In the system tray, right-click on the Docker icon.
  2. Choose "Settings"
  3. Go to the "Shared Drives" tab.
  4. Clear the checkbox next to drive C.
  5. Click Apply.
  6. Set the checkbox next to drive C.
  7. 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/"

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)

Make sure the Firewall is set to allow 10.0.75.1 to receive packets form 10.0.75.2 on port 445

  • 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.

Make sure the "vEthernet (DockerNAT)" network is set to private

  1. Open an elevated powershelll prompt
  2. Run the command: Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private

References

⚠️ **GitHub.com Fallback** ⚠️