{"record":{"id":"8607275c572a14c2","repo":"testcontainers/testcontainers-java","slug":"s-containers-are-currently-not-supported","errorCode":null,"errorMessage":"%s containers are currently not supported","messagePattern":"(.+?) containers are currently not supported","errorType":"exception","errorClass":"InvalidConfigurationException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java","lineNumber":303,"sourceCode":"                log.debug(\"strategy {} did not pass the test\", strategy.getClass().getSimpleName());\n                return false;\n            }\n\n            strategy.info = strategy.getDockerClient().infoCmd().exec();\n            log.info(\"Found Docker environment with {}\", strategy.getDescription());\n            log.debug(\n                \"Transport type: '{}', Docker host: '{}'\",\n                TestcontainersConfiguration.getInstance().getTransportType(),\n                strategy.getTransportConfig().getDockerHost()\n            );\n\n            log.debug(\"Checking Docker OS type for {}\", strategy.getDescription());\n            String osType = strategy.getInfo().getOsType();\n            if (StringUtils.isBlank(osType)) {\n                log.warn(\"Could not determine Docker OS type\");\n            } else if (!osType.equals(\"linux\")) {\n                log.warn(\"{} is currently not supported\", osType);\n                throw new InvalidConfigurationException(osType + \" containers are currently not supported\");\n            }\n\n            if (strategy.isPersistable()) {\n                TestcontainersConfiguration\n                    .getInstance()\n                    .updateUserConfig(\"docker.client.strategy\", strategy.getClass().getName());\n            }\n\n            return true;\n        } catch (Exception | ExceptionInInitializerError | NoClassDefFoundError e) {\n            @Nullable\n            String throwableMessage = e.getMessage();\n            @SuppressWarnings(\"ThrowableResultOfMethodCallIgnored\")\n            Throwable rootCause = Throwables.getRootCause(e);\n            @Nullable\n            String rootCauseMessage = rootCause.getMessage();\n\n            String failureDescription;","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java#L285-L321","documentation":"After picking a Docker strategy, Testcontainers pings the daemon and inspects its OS type. If the daemon reports an osType other than 'linux' (typically 'windows'), tryOutStrategy throws InvalidConfigurationException because Testcontainers only supports Linux containers. The thrown message is the OS type plus 'containers are currently not supported'.","triggerScenarios":"Running tests against a Docker daemon configured for Windows containers (Docker Desktop 'Switch to Windows containers'), so strategy.getInfo().getOsType() returns \"windows\" and the check `!osType.equals(\"linux\")` fails.","commonSituations":"Docker Desktop on Windows left in Windows-container mode; CI agents with Windows-container daemons; a daemon reporting a blank/odd osType falls through with only a warning instead.","solutions":["Switch Docker Desktop back to Linux containers (system tray icon or `& 'C:\\Program Files\\Docker\\Docker\\DockerCli.exe' -SwitchLinuxEngine`)","Point DOCKER_HOST at a Linux-capable daemon (remote Linux host, WSL2 backend)","Verify with `docker info --format '{{.OSType}}'` that the daemon reports linux before running tests"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Refuse to run against non-Linux daemons before starting containers\nString osType = java.util.Optional.ofNullable(\n        new com.github.dockerjava.core.DefaultDockerClientConfig.Builder().build()\n            ).orElse(null) != null ? null : null;\nProcess p = new ProcessBuilder(\"docker\", \"info\", \"--format\", \"{{.OSType}}\").start();\nString out = new String(p.getInputStream().readAllBytes()).trim();\nif (!\"linux\".equals(out)) {\n    throw new IllegalStateException(out + \" containers are not supported; switch Docker to Linux engine\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    container.start();\n} catch (InvalidConfigurationException e) {\n    if (e.getMessage().endsWith(\"containers are currently not supported\")) {\n        // switch the daemon to Linux containers and rerun\n    }\n    throw e;\n}","preventionTips":["Keep Docker Desktop in Linux-container mode on Windows dev machines","Check `docker info --format '{{.OSType}}'` in CI pre-steps","Use WSL2/remote Linux daemons where Linux containers are required"],"tags":["docker","windows-containers","platform","testcontainers"],"backgroundTag":"unsupported-platform","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}