Install and Troubleshoot Docker Toolbox on Windows 10 Home
As the Docker for Windows only works on Windows 10 Pro and Enterprise editions, I cannot install it on my laptop which comes with a pre-installed Windows 10 Home. Fortunately, Docker has another product called Docker toolbox. It is specifically released for legacy desktop operating system versions. (Somehow windows 10 home is considered as legacy…)
However, there are some caveats during the installation and configuration of the Docker toolbox on my laptop, so here are the problems and solutions I found useful:
Problem 1:
Problem: If you follow the installation instruction, and choose default options throughout the installation, you might not successfully install the docker toolbox. After installation, you need to open the Docker QuickStart
app to verify the installation, and you might see an error message that contains something like this: Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT)
.
Solution:
- first of all, make sure that the hardware virtualization is enabled, this is done by editting the settings in BIOS.
- According to this discussion, you need to disable Hypervisior to check new application that use VT-x before the virtual machine launch. Here are the steps:
- run cmd.exe as administrator
- run
bcdedit /set hypervisorlaunchtype off
. - run
bcdedit
, and verifyhypervisorlaunchtype
isoff
. - uninstall and reinstall the docker toolbox.
Problem 2:
Problem: Docker toolbox by default uses POSIX path standard, therefore, the slash-backslash problem arises. Specifically, when I try to run a docker image with default settings (mounting folder, mountingworkspace etc.), it fails with an error message: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'C:/Users/xxx/work-folder
.
Solution: By default, the docker toolbox on windows mounts the current working folder, using windows-style, i.e. c:\users\xxx\work-folder
. Simply change the \
to /
works for me. Since I am using Visual Studio Code to open a folder in a container, this is done by editing the ./devcontainer/devcontainer.json
file. Add the workspaceMount
argument in the file and rebuild the image.