Lyndon Dallas
Lyndon Dallas

Reputation: 21

Docker VS Code WSL 2 exception

I recently added the Docker extension onto VS code. Then I downloaded Docker, after installation I received this exception:

.NET Framework Error- Unhandled exception- exception type 'Docker.ApiServices.WSL2.WslKernel`

I'm not quite sure where to proceed from here.

Microsoft .Net Framework Error

Upvotes: 2

Views: 1202

Answers (2)

Tyler
Tyler

Reputation: 31

I had the same exception and command: wsl --set-default-version 2 returned message: An update to the WSL 2 kernel component is required. For information, visit the https://aka.ms/wsl2kernel website. (This is not original message, I've translated it from my native language.) When I've followed link and installed kernel update docker starts working.

Upvotes: 3

MiKr13
MiKr13

Reputation: 1511

I believe Docker is trying to run on Windows WSL framework/feature. Please make sure you've turned it on.

How to do that?

  1. In windows search type - turn windows features on or off
  2. Make sure you've the option - Windows subsystem for Linux selected there, if it isn't, select it and click okay. windows subsystem image addedd
  3. It'll install WSL on your system & tell you to restart, after system restart your docker will run properly!
  4. As a bonus, run powershell with administrative privileges & run this command wsl --set-default-version 2, this will make your system switch to latest version of WSL with added benefits.

If this answer helps, let me know, or I can go in further details.

Upvotes: 0

Related Questions