Docker Desktop shortcuts don't work in WSL

Hello,

recently discovered that docker desktop cli shortcuts do not work, when compose runs inside WSL.

I get the following errors:

  • key v: View Config → Could not open Docker Desktop Compose UI
  • key o: View → Could not open Docker Desktop

When running the same compose project, i.e. in a Windows Terminal everything works as expected and the shortcut opens the Docker Desktop UI

I’m possibly not up to date on Docker Desktop features. Can you link a documentation, blogpost or anything about what shortcut you mean?

I’m referring to the shortcuts at the bottom of the terminal:

docker version:

Client:
Version: 27.1.1
API version: 1.46
Go version: go1.21.12
Git commit: 6312585
Built: Tue Jul 23 19:55:52 2024
OS/Arch: linux/amd64
Context: default

Server: Docker Desktop ()
Engine:
Version: 27.1.1
API version: 1.46 (minimum version 1.24)
Go version: go1.21.12
Git commit: cc13f95
Built: Tue Jul 23 19:57:19 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.19
GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
runc:
Version: 1.7.19
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0

docker compose version

Docker Compose version v2.29.1-des

I still don’t know what that is. Is it the integrated terminal that you can start from the GUI of Docker Desktop? If it is, then it is, then I don’t know why it would work when you open a WSL2 terminal. In WSL2 you have a docker client connecting to the docker daemon in another WSL2 distribution. On Windows, you have Docker Desktop GUI, but the Docker client and Docker compose inside the WSL2 distribution cannot change the behavior of an app started on Windows.

It’s an ordinary Windows Terminal running Ubuntu WSL - no Docker Desktop UI integrated Terminal.

The WSL uses the Docker WSL integration:

So, the Docker and docker compose cli in the WSL directly communicates with the Docker Windows engine. There’s no Docker in WSL or Docker in Docker setup involved!

The Docker daemon runs in a WSL2 distribution. There is no “Docker Windows Engine” unless you use Windows containers, which is not the case as that would not run in WSL.

I turned on my Windows, and managed to find out how you got that menu at the bottom of the terminal. I thought it was shown by the terminal itself, but it is part of the output of docker compose up when starting the containers. I don’t know wha that doesn’t work from WSL2 if it is shown, so maybe you can look for existing issues or open a new issue on GitHub

The diffrence between the two cases is that on the Windows host, opening a GUI app is obvious, while in WSL2, you are doing it from a virtual machine but it is supported so something must be missing from the WSL2 point of view. A folder in the PATH for example.

I assumed it’s an intended feature as well. Followed your advice and opened an issue. See https://github.com/docker/for-win/issues/14266