Docker Community Forums

Share and learn in the Docker community.

Interaction Between Docker Desktop for Windows and WSL2?

My home PC has Windows Home. The winver command tells me that it is Version 2004 (build 19041.252). In about 7/2020 I installed WSL2 on my machine, and it seemed to be working pretty well. Recently, because it is used by a company I am contracted to, I also installed Docker Desktop for Windows. It installed without any problems, and I went through the “Getting Started” tutorial without adifficulties. However, when I subsequently did a "docker image build my_docker . " command, it resulted in a number of confusing errors which other team guys did not get . They are generally using Windows 10 Pro, and also do not have WSL2 installed.
I initially assumed that, as long as the WSL2 code was not actively in use (i.e., I did not have a terminal open running an instance of bash), that there should not be a problem in running Docker Desktop for Windows. Now, I am beginning to question that assumption. Has anyone else in the forum successfully had Docker Desktop for Windows and WSL2 both installed on Windows Home? Are there are rules / procedures that I have to observe to do this successfully? Thx.

Specifically, I enter the following command, and get this output:

$ docker image build -t my_docker .
[+] Building 1.3s (2/2) FINISHED
=> [internal] load .dockerignore 0.9s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 1.2s
=> => transferring dockerfile: 2B 0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount183314913/Dockerfile: no such file or directory

Its possible that the first four lines of output are normal / expected. I have no idea what the
"failed to solve with frontend dockerfile.vo … error means, nor how to resolve it. Any advice
would be appreciated.