You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check if agent is supported on current platform
76
+
ifruntime.GOOS=="windows" {
77
+
switchagentKey {
78
+
case"codex", "amazonq":
79
+
returnnil, fmt.Errorf("agent '%s' is not supported on native Windows.\nTo use this agent, please install and run container-use in Windows Subsystem for Linux (WSL)", agentKey)
returnstrings.Contains(errStr, "cannot connect to the docker daemon") ||
17
-
strings.Contains(errStr, "docker daemon") ||
16
+
17
+
// Linux: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
18
+
ifstrings.Contains(errStr, "cannot connect to the docker daemon") {
19
+
returntrue
20
+
}
21
+
22
+
// Windows: error during connect: Get "http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.51/containers/json": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
23
+
ifstrings.Contains(errStr, "error during connect") &&strings.Contains(errStr, "pipe/dockerdesktoplinuxengine") &&strings.Contains(errStr, "the system cannot find the file specified") {
24
+
returntrue
25
+
}
26
+
27
+
// macOS: request returned 500 Internal Server Error for API route and version http://%2FUsers%2Fb1tank%2F.docker%2Frun%2Fdocker.sock/v1.50/containers/json, check if the server supports the requested API version
28
+
ifstrings.Contains(errStr, "request returned 500 internal server error") &&strings.Contains(errStr, "docker.sock") &&strings.Contains(errStr, "check if the server supports the requested api version") {
err: errors.New("Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"),
22
22
expected: true,
23
23
},
24
+
{
25
+
name: "docker daemon error - windows",
26
+
err: errors.New("error during connect: Get \"http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.51/containers/json\": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified."),
27
+
expected: true,
28
+
},
29
+
{
30
+
name: "docker daemon error - macos",
31
+
err: errors.New("request returned 500 Internal Server Error for API route and version http://%2FUsers%2Fb1tank%2F.docker%2Frun%2Fdocker.sock/v1.50/containers/json, check if the server supports the requested API version"),
32
+
expected: true,
33
+
},
34
+
{
35
+
name: "docker daemon error - generic",
36
+
err: errors.New("docker daemon is not running"),
37
+
expected: true,
38
+
},
39
+
{
40
+
name: "docker socket error - generic",
41
+
err: errors.New("connection to docker.sock failed"),
0 commit comments