Skip to content

Commit 9cb94c8

Browse files
authored
Merge pull request #133 from doringeman/context
context: fix Docker Desktop detection from within WSL2
2 parents 67e5699 + 5e72521 commit 9cb94c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

desktop/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func isDesktopContext(ctx context.Context, cli *command.DockerCli) bool {
3333
if strings.Contains(serverInfo.KernelVersion, "-microsoft-standard-WSL2") {
3434
// We can use Docker Desktop from within a WSL2 integrated distro.
3535
// https://github.com/search?q=repo%3Amicrosoft%2FWSL2-Linux-Kernel+path%3A%2F%5Earch%5C%2F.*%5C%2Fconfigs%5C%2Fconfig-wsl%2F+CONFIG_LOCALVERSION&type=code
36-
return true
36+
return serverInfo.OperatingSystem == "Docker Desktop"
3737
}
3838
return false
3939
}

0 commit comments

Comments
 (0)