Docker Community Forums

Share and learn in the Docker community.

Change WSL Version from CLI

I am using Docker Desktop for Windows 3.1. Is it possible to change the WSL version used (1 or 2) from the CLI or a config file rather than in the UI when docker desktop is started?

Why would you want to use WSL v1 ?

Does that really matter ? :slight_smile: I have found WSL2 unreliable on Windows 10 Enterprise 1909.

Well perhaps not, but it wasn’t clear whether you wanted to switch between versions because of a functionality or another reason. I have used both WSL 1 and 2 fairly extensively (with Docker Enterprise and Community editions) and tbh not had any reliability issues with v2 other than the expected ‘quirks’ because of the unusual init system and how instance IPs are managed.

Why don’t you provide more details of what you are having problems with in v2 and you may get a more specific answer (I assume you have raised an issue on the WSL backlog ?).

I think that would be a different topic. Regardless of my motivation my question in valid. Since you asked though we have issues with WSL2 when the group policy setting here is set to disabled but differs depending on Windows 10 version. :slight_smile:

Anyone? DockerCli.exe doesn’t appear to have any help options that dump out the switches. I can try and set the following in the settings file:

“wslEngineEnabled”: false,