MCPcopy Create free account
hub / github.com/ddev/ddev / IsDockerDesktop

Function IsDockerDesktop

pkg/dockerutil/providers.go:11–23  ·  view source on GitHub ↗

IsDockerDesktop detects if running on Docker Desktop

()

Source from the content-addressed store, hash-verified

9
10// IsDockerDesktop detects if running on Docker Desktop
11func IsDockerDesktop() bool {
12 info, err := GetDockerClientInfo()
13 if err != nil {
14 return false
15 }
16 if strings.HasPrefix(info.OperatingSystem, "Docker Desktop") {
17 return true
18 }
19 if strings.Contains(info.Name, "docker-desktop") {
20 return true
21 }
22 return false
23}
24
25// IsColima detects if running on Colima
26func IsColima() bool {

Callers 6

TestDdevXdebugEnabledFunction · 0.92
GetDockerPlatformFunction · 0.92
TestCmdAuthSSHFunction · 0.92
activeDockerProviderFunction · 0.92
TestPoweroffOnNewVersionFunction · 0.92
GetHostDockerInternalFunction · 0.85

Calls 1

GetDockerClientInfoFunction · 0.85

Tested by 3

TestDdevXdebugEnabledFunction · 0.74
TestCmdAuthSSHFunction · 0.74
TestPoweroffOnNewVersionFunction · 0.74