{"record":{"id":"09a8b659efa10709","repo":"testcontainers/testcontainers-java","slug":"check-failed","errorCode":null,"errorMessage":"Check failed: ","messagePattern":"Check failed: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/org/testcontainers/DockerClientFactory.java","lineNumber":280,"sourceCode":"        } else {\n            log.debug(\"Checks are disabled\");\n        }\n\n        return client;\n    }\n\n    private void checkDockerVersion(String dockerVersion) {\n        boolean versionIsSufficient = new ComparableVersion(dockerVersion).compareTo(new ComparableVersion(\"1.6.0\")) >=\n        0;\n        check(\"Docker server version should be at least 1.6.0\", versionIsSufficient);\n    }\n\n    private void check(String message, boolean isSuccessful) {\n        if (isSuccessful) {\n            log.info(\"\\u2714\\ufe0e {}\", message);\n        } else {\n            log.error(\"\\u274c {}\", message);\n            throw new IllegalStateException(\"Check failed: \" + message);\n        }\n    }\n\n    private boolean checkMountableFile() {\n        DockerClient dockerClient = client();\n\n        MountableFile mountableFile = MountableFile.forClasspathResource(\n            ResourceReaper.class.getName().replace(\".\", \"/\") + \".class\"\n        );\n\n        Volume volume = new Volume(\"/dummy\");\n        try {\n            return runInsideDocker(\n                createContainerCmd -> {\n                    createContainerCmd.withBinds(new Bind(mountableFile.getResolvedPath(), volume, AccessMode.ro));\n                },\n                (__, containerId) -> {\n                    try (","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/core/src/main/java/org/testcontainers/DockerClientFactory.java#L262-L298","documentation":"DockerClientFactory.check() validates environment preconditions (e.g. docker version, disk space, mounts). When a check fails it logs a cross mark and throws IllegalStateException('Check failed: <message>') describing which precondition did not hold.","triggerScenarios":"Running inside DockerClientFactory.client()/getOrInitializeStrategy() during container startup when checkDockerVersion (or another private check such as checkDiskSpace or checkMountableFile) reports isSuccessful=false — e.g. a Docker daemon older than the minimum supported version.","commonSituations":"Old Docker daemon versions (pre-1.10-era APIs), Docker-in-CircleCI/CI runners with restricted storage drivers, out-of-disk environments failing the disk-space check.","solutions":["Read the message suffix in the exception to see which check failed","Upgrade the Docker daemon to a version supported by this Testcontainers release","Fix the environment issue indicated (free disk space, fix storage driver, fix mount support)","Set the relevant testcontainers overrides if the check is a false positive"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Info info = DockerClientFactory.instance().client().infoCmd().exec(); if (VersionComparator.compare(info.getServerVersion(), \"1.30\") < 0) { throw new SkipException(\"Docker too old: \" + info.getServerVersion()); }","typeGuard":null,"tryCatchPattern":"try { container.start(); } catch (IllegalStateException e) { if (e.getMessage().startsWith(\"Check failed:\")) { Assumptions.assumeFalse(true, \"Environment check failed: \" + e.getMessage()); } throw e; }","preventionTips":["Pin a modern Docker daemon in CI images","Monitor daemon disk space before test runs","Run DockerClientFactory checks early in the build to fail fast with a clear message"],"tags":["docker","environment-check","version-compatibility","startup"],"backgroundTag":"invalid-config-value","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"}