Docker Desktop & WSL Randomly Breaks
2024-4-11 12:41:40 Author: 0xda.de(查看原文) 阅读量:18 收藏

Has your docker connection in WSL2 suddenly stopped working after updating Docker Desktop? Or maybe after a windows update? Or maybe after rebooting?

You’re not crazy. You’ve experienced this before. Others have experienced this before, and sometimes even worse variants, like the WSL integration stops working on reboot. You might be tempted to think something complicated is broken, with dangling symlinks or something. You might see some stack overflow posts that would leave you to believe that you need to be running systemd. You do not.

The fix is easy and with any luck you’ll check your own notes before you scour the internet trying to fix this again next time.

In Docker Desktop configuration, there is a setting in the “General” section about “Use the WSL 2 based engine” – You will probably think this is the setting you need to toggle off and back on for your WSL integration to start working again. You would be wrong.

What you actually want is to click on “Resources” and then when the sidebar menu expands, click on “WSL integration.” It is here that your setting has probably been messed up. Make sure that WSL integration is turned on for the WSL distribution you’re using.

Click “Apply & restart.”

Carry on with your actual projects instead of spending half an hour getting pissed off at computers, telling yourself you’re going to sell everything you own and open that beach bar in Costa Rica you’ve been talking about for 10 years. You don’t even drink that much, and sand will get in your underwear. You don’t want that, do you? Just fix docker and go back to that project you’ll never finish, nerd.


文章来源: https://0xda.de/blog/2024/04/docker-desktop-wsl-randomly-breaks/
如有侵权请联系:admin#unsafe.sh