Actual behavior
- Start Docker Desktop for Windows on Linux containers mode.
- Run
docker context ls. There's two by default as of 3.5.0, default and desktop-linux.
- Switch to
desktop-linux with docker context use desktop-linux.
- Switch to Windows containers.
- Attempt any
docker ... command. You get the error: Current context "desktop-linux" is not found on the file system, please check your config file at C:\Users\username\.docker\config.json. Even docker context use desktop-windows does not work, with the same error.
- Switch back to Linux containers. The error still persists, even though this context does exist now!
The only way I've found to make the error go away is to manually edit ~/.docker/config.json by setting the context to default.
Note: You can reproduce the same behavior if you go from Windows containers -> Linux containers with desktop-windows.
This reproduces every time.
Expected behavior
- Switching from Linux to Windows containers or vice versa should automatically switch from
desktop-linux to desktop-windows or vice versa.
Information
- Windows Version: 21H1
- Docker Desktop Version: 3.5.2
- WSL2 or Hyper-V backend: WSL2
- Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No
Actual behavior
docker context ls. There's two by default as of 3.5.0,defaultanddesktop-linux.desktop-linuxwithdocker context use desktop-linux.docker ...command. You get the error:Current context "desktop-linux" is not found on the file system, please check your config file at C:\Users\username\.docker\config.json. Evendocker context use desktop-windowsdoes not work, with the same error.The only way I've found to make the error go away is to manually edit
~/.docker/config.jsonby setting the context todefault.Note: You can reproduce the same behavior if you go from Windows containers -> Linux containers with
desktop-windows.This reproduces every time.
Expected behavior
desktop-linuxtodesktop-windowsor vice versa.Information