{"record":{"id":"847d767172662102","repo":"testcontainers/testcontainers-java","slug":"could-not-determine-docker-os-type","errorCode":null,"errorMessage":"Could not determine Docker OS type","messagePattern":"Could not determine Docker OS type","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java","lineNumber":300,"sourceCode":"            log.debug(\"Trying out strategy: {}\", strategy.getClass().getSimpleName());\n\n            if (!strategy.test()) {\n                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","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java#L282-L318","documentation":"After a strategy passed its reachability test, Testcontainers pings the daemon for its OS type (`/info` osType) and got a blank value. It logs this warning and continues, treating the OS as unknown rather than failing. Usually indicates the daemon returned an unexpected or empty info response.","triggerScenarios":"strategy.getInfo().getOsType() returns null/empty while running getFirstValidStrategy, i.e. the Docker Engine's info endpoint did not report osType (unusual daemon versions, proxies stripping fields, or non-Docker daemons mimicking the API).","commonSituations":"Using a non-standard Docker-compatible daemon (Podman, Kaniko-style endpoints, corporate proxies) whose /info omits osType; very old or very new Engine API versions with changed fields; a reverse proxy in front of the socket rewriting responses.","solutions":["Check `docker info` manually and confirm the daemon reports an OSType; upgrade or replace the daemon if not.","If using Podman or an alternative daemon, ensure you run a version that fully implements the Docker Engine API /info payload, or use the podman-compatible socket exposed via podman socket.","Remove/inspect any proxy between the client and daemon that may strip JSON fields.","This is only a warning — the strategy still proceeds; if downstream code fails, pin a standard Docker Engine as the test environment."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Probe the daemon's info endpoint before the suite\nString out = new BufferedReader(new InputStreamReader(\n    new URL(\"http://localhost:2375/info\").openStream())).lines()\n    .collect(Collectors.joining());\nif (!out.contains(\"ostype\") && !out.toLowerCase().contains(\"ostype\")) {\n    log.warn(\"Daemon /info did not report osType; Testcontainers may log 'Could not determine Docker OS type'\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a standard Docker Engine (not a partial Docker-API emulation like some Podman versions) in test environments.","Keep the daemon reasonably up to date so Engine API /info responses are complete.","Avoid proxies that rewrite/strip Docker API JSON responses."],"tags":["docker","docker-engine-api","daemon-info","testcontainers"],"backgroundTag":"unexpected-response-shape","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}