{"record":{"id":"eaffe092bad1d7d5","repo":"elastic/elasticsearch","slug":"message-you-can-address-this-by-attending-to-the","errorCode":null,"errorMessage":"{message}\nyou can address this by attending to the reported issue, or removing the offending tasks from being executed.","messagePattern":"(.+?)\nyou can address this by attending to the reported issue, or removing the offending tasks from being executed\\.","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportService.java","lineNumber":363,"sourceCode":"    }\n\n    /**\n     * Searches the entries in {@link #DOCKER_COMPOSE_BINARIES} for the Docker Compose CLI. This method does\n     * not check whether the installation appears usable, see {@link #getDockerAvailability()} instead.\n     *\n     * @return the path to a CLI, if available.\n     */\n    private Optional<String> getDockerComposePath() {\n        // Check if the Docker binary exists\n        return Stream.of(DOCKER_COMPOSE_BINARIES).filter(path -> new File(path).exists()).findFirst();\n    }\n\n    private void throwDockerRequiredException(final String message) {\n        throwDockerRequiredException(message, null);\n    }\n\n    private void throwDockerRequiredException(final String message, Exception e) {\n        throw new GradleException(\n            message + \"\\nyou can address this by attending to the reported issue, or removing the offending tasks from being executed.\",\n            e\n        );\n    }\n\n    public void storeInfo(Map<String, ServiceInfo> servicesInfos) {\n        tcpPorts = servicesInfos.entrySet()\n            .stream()\n            .collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue().getTcpPorts()));\n        udpPorts = servicesInfos.entrySet()\n            .stream()\n            .collect(Collectors.toMap(entry -> entry.getKey(), entry -> entry.getValue().getUdpPorts()));\n    }\n\n    public Map<String, Map<Integer, Integer>> getTcpPorts() {\n        return tcpPorts;\n    }\n","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/docker/DockerSupportService.java#L345-L381","documentation":"A wrapper thrown by throwDockerRequiredException(String, Exception) whenever a Gradle task requires Docker but Docker is unavailable, too old, or malfunctioning. The method appends a generic remediation suffix to a context-specific message. It is called from three sites: no Docker binary found (line 194), Docker version below MINIMUM_DOCKER_VERSION (line 205), and Docker exited with a non-zero exit code (line 223).","triggerScenarios":"A task annotated or configured to require Docker (via DockerSupportService.assertDockerAvailableForTasks or similar) executes, and DockerSupportService.getDockerAvailability() reports: (1) availability.path == null (no binary in DOCKER_BINARIES or PATH), (2) isVersionHighEnough == false (Docker version < MINIMUM_DOCKER_VERSION), or (3) lastCommand failed with non-zero exit code.","commonSituations":"Docker daemon is not running on the developer's machine. Docker is installed but not on PATH in the Gradle worker's environment (common in IDE-launched builds). Docker is installed but the version is older than required for multi-stage builds. Docker daemon is running but is out of disk space or has socket permission issues, causing commands to fail.","solutions":["Start the Docker daemon: systemctl start docker (Linux) or open Docker Desktop (macOS/Windows).","If Docker is installed but not found, set DOCKER_HOST or ensure /usr/bin/docker (or /usr/local/bin/docker) exists and is on PATH for the Gradle daemon process.","Upgrade Docker to at least MINIMUM_DOCKER_VERSION if the version is too old.","If you don't need Docker, exclude the offending tasks from the task graph (e.g., ./gradlew build -x dockerBuild --exclude-task ...)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-build Docker availability check\nProcess p = new ProcessBuilder(\"docker\", \"version\").redirectErrorStream(true).start();\nint exit = p.waitFor();\nif (exit != 0) {\n    throw new GradleException(\"Docker is not available. Start Docker daemon.\");\n}","typeGuard":null,"tryCatchPattern":"// Wrap Docker-dependent task execution\ntasks.matching { it.name.contains('docker') }.configureEach {\n    doFirst {\n        try {\n            dockerSupport.get().assertDockerAvailableForTasks(List.of(it.getName()))\n        } catch (GradleException e) {\n            throw new StopExecutionException(\"Docker unavailable: skipping \" + it.getName())\n        }\n    }\n}","preventionTips":["Run 'docker info' before starting a Docker-dependent build.","Ensure Docker CLI is on PATH for the Gradle daemon (check IDE-launched daemon PATH).","Keep Docker updated to at least MINIMUM_DOCKER_VERSION.","Use ./gradlew --stop after Docker installation so the daemon picks up the new PATH."],"tags":["docker","build-infrastructure","environment","ci"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}