Issue installing docker desktop on Windows Server 2022 (WSL 2)

I have Windows Server 2022 (bulid 203848.617) installed as a hyper-v guest machine. I’ve enabled nested virtualization on the physical host machine.

I’m able to get WSL installed, but it is only version 1. I’ve tried the --set-verson command as --set-version Ubuntu 2.

I only get help text when I run that command, indicating that it doesn’t recognize the --set-version

My goal is get this running so I can install docker (docker complains wsl2 is missing during install).
I’d really like to get that gui for docker working on the server.

Am I missing something?

I don’t know if WSL2 is supported on Windows server, but Docker Desktop is not supported.

Can I run Docker Desktop on Windows Server?:link:

No, running Docker Desktop on Windows Server is not supported.


Here is microsoft’s instructions to install Docker (not Docker Desktop) on Windows Server:

Sounds like my best 2 options are to either run a windows 10 vm on the server and install docker desktop on that. Or use the windows server supplied containers feature and install docker to run from the command line. The challenge is that I need to change the container type from windows to linux and the only way I’ve found documented to do that is through the gui (which docker on my server doesn’t have).

If I do the windows 10 vm solution, I feel like I am doulbling the amount of virtualization. How much of a penalty do you think that is?

Other things to think about?

Is there a specific reason you want to nest the vm’s like that? since you seem to aim to run linux containers, wouldn’t it make more sense to run a Linux hyper-v guest vm with Ubuntu 20.04 on the pysical host machine? This way you get docker in its natural habitat, where it’s first class citizen.

Please bare in mind that running Docker (for Desktop) in Windows 10 still requires a vm (regardless wether wsl1 or wsl2) to run linux container. You would end up having a vm (wsl1 vm/shared wsl2 vm that runs all wsl2 distros) in a vm (Windows 10) in a vm (Windows Server 2022)…

1 Like

I totally agree with Metin. Run a Linux VM on Windows Server :slight_smile:
If you do that it will mean.

  1. (+) You can configure everything on Linux as you like
  2. (-) You need to configure everything that you would get with Docker Desktop, like the GPU support
  3. (+) You can access containers using their private IP address easily without port mapping

Probably there are more pros and cons but one thing is sure: