{"record":{"id":"d3a3f9eb92952038","repo":"spring-projects/spring-boot","slug":"docker-api-version-must-be-at-least-s-to-support","errorCode":null,"errorMessage":"Docker API version must be at least %s to support this feature, but current API version is %s","messagePattern":"Docker API version must be at least (.+?) to support this feature, but current API version is (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java","lineNumber":151,"sourceCode":"\n\tprivate URI buildUrl(String path, @Nullable Collection<?> params) {\n\t\treturn buildUrl(Feature.BASELINE, path, (params != null) ? params.toArray() : null);\n\t}\n\n\tprivate URI buildUrl(String path, Object... params) {\n\t\treturn buildUrl(Feature.BASELINE, path, params);\n\t}\n\n\tURI buildUrl(Feature feature, String path, Object @Nullable ... params) {\n\t\tApiVersion version = getApiVersion();\n\t\tif (version.equals(UNKNOWN_API_VERSION) || (version.compareTo(PREFERRED_API_VERSION) >= 0\n\t\t\t\t&& version.compareTo(feature.minimumVersion()) >= 0)) {\n\t\t\treturn buildVersionedUrl(PREFERRED_API_VERSION, path, params);\n\t\t}\n\t\tif (version.compareTo(feature.minimumVersion()) >= 0) {\n\t\t\treturn buildVersionedUrl(version, path, params);\n\t\t}\n\t\tthrow new IllegalStateException(\n\t\t\t\t\"Docker API version must be at least %s to support this feature, but current API version is %s\"\n\t\t\t\t\t.formatted(feature.minimumVersion(), version));\n\t}\n\n\tprivate URI buildVersionedUrl(ApiVersion version, String path, Object @Nullable ... params) {\n\t\ttry {\n\t\t\tURIBuilder builder = new URIBuilder(\"/v\" + version + path);\n\t\t\tif (params != null) {\n\t\t\t\tint param = 0;\n\t\t\t\twhile (param < params.length) {\n\t\t\t\t\tbuilder.addParameter(Objects.toString(params[param++]), Objects.toString(params[param++]));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn builder.build();\n\t\t}\n\t\tcatch (URISyntaxException ex) {\n\t\t\tthrow new IllegalStateException(ex);\n\t\t}","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/270dfe353fb830fd69b823a8a859287ff103854b/buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java#L133-L169","documentation":"DockerApi.buildUrl(Feature, ...) negotiates the Docker engine API version against the minimum required by the requested Feature. If the running daemon's version is older than feature.minimumVersion() (and not the UNKNOWN_API_VERSION sentinel), the operation is unsupported and the plugin throws IllegalStateException naming both the required and the current version.","triggerScenarios":"Invoking buildpack features that require a newer Docker API than the running daemon provides (e.g. PLATFORM_IMAGE_PULL requires 1.41).","commonSituations":"Old Docker daemon on a CI runner; podman/docker-compatible engines with limited API coverage; enterprise-locked Docker versions; outdated Docker Desktop.","solutions":["Upgrade Docker engine to a version supporting the required API (check 'docker version' Server API version)","Use a CI runner image with a newer Docker daemon","Replace podman/compatibility shim with a real Docker daemon if API coverage is missing"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"ApiVersion current = docker.getApiVersion();\nif (current.compareTo(feature.minimumVersion()) < 0) {\n    throw new IllegalStateException(\"Docker daemon too old: need \" + feature.minimumVersion() + \", have \" + current);\n}","typeGuard":null,"tryCatchPattern":"try { docker.buildUrl(feature, path); } catch (IllegalStateException ex) { log.error(\"Upgrade Docker daemon -- feature requires a newer API\"); throw ex; }","preventionTips":["Check 'docker version' Server API version before using buildpack features","Use a CI runner image with a current Docker daemon","Document minimum Docker version in the project README"],"tags":["docker","versioning","buildpack","compatibility"],"backgroundTag":null,"analyzedSha":"270dfe353fb830fd69b823a8a859287ff103854b","analyzedAt":"2026-08-11T19:42:06.541Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}