{"record":{"id":"20863ce59729f70b","repo":"quarkusio/quarkus","slug":"unable-to-build-container-image-please-check-your","errorCode":null,"errorMessage":"Unable to build container image. Please check your %s installation.","messagePattern":"Unable to build container image\\. Please check your (.+?) installation\\.","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/container-image/container-image-docker-common/deployment/src/main/java/io/quarkus/container/image/docker/common/deployment/CommonProcessor.java","lineNumber":73,"sourceCode":"\n    protected void buildFromJar(C config,\n            ContainerRuntimeStatusBuildItem containerRuntimeStatusBuildItem,\n            ContainerImageConfig containerImageConfig,\n            OutputTargetBuildItem out,\n            ContainerImageInfoBuildItem containerImageInfo,\n            Optional<ContainerImageBuildRequestBuildItem> buildRequest,\n            Optional<ContainerImagePushRequestBuildItem> pushRequest,\n            BuildProducer<ArtifactResultBuildItem> artifactResultProducer,\n            BuildProducer<ContainerImageBuilderBuildItem> containerImageBuilder,\n            PackageConfig packageConfig,\n            ContainerRuntime... containerRuntimes) {\n\n        var buildContainerImage = buildContainerImageNeeded(containerImageConfig, buildRequest);\n        var pushContainerImage = pushContainerImageNeeded(containerImageConfig, pushRequest);\n\n        if (buildContainerImage || pushContainerImage) {\n            if (!containerRuntimeStatusBuildItem.isContainerRuntimeAvailable()) {\n                throw new RuntimeException(\n                        \"Unable to build container image. Please check your %s installation.\"\n                                .formatted(getProcessorImplementation()));\n            }\n\n            var dockerfilePaths = getDockerfilePaths(config, false, packageConfig, out);\n            var dockerfileBaseInformation = DockerFileBaseInformationProvider.impl()\n                    .determine(dockerfilePaths.dockerfilePath());\n\n            if (dockerfileBaseInformation.isPresent() && (dockerfileBaseInformation.get().javaVersion() < 17)) {\n                throw new IllegalStateException(\n                        \"The project is built with Java 17 or higher, but the selected Dockerfile (%s) is using a lower Java version in the base image (%s). Please ensure you are using the proper base image in the Dockerfile.\"\n                                .formatted(\n                                        dockerfilePaths.dockerfilePath().toAbsolutePath(),\n                                        dockerfileBaseInformation.get().baseImage()));\n            }\n\n            if (buildContainerImage) {\n                LOGGER.infof(\"Starting (local) container image build for jar using %s\", getProcessorImplementation());","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/container-image/container-image-docker-common/deployment/src/main/java/io/quarkus/container/image/docker/common/deployment/CommonProcessor.java#L55-L91","documentation":"Before building a JVM-mode container image, the Docker (or Podman) processor checks whether a container runtime binary is available on the machine. If the runtime check build item reports no available runtime, the build fails with this RuntimeException naming the processor implementation (e.g. docker or podman).","triggerScenarios":"Running quarkus.container-image.build=true (or -Dquarkus.container-image.build) for a JVM package while neither docker nor podman is installed, not on PATH, or the daemon is unreachable so the runtime probe fails.","commonSituations":"Docker Desktop not started, CI runner without Docker daemon (no docker:dind service), podman not installed in the build container, docker binary exists but 'docker info' fails due to permissions (user not in docker group).","solutions":["Install/start Docker (or Podman) and ensure the CLI is on PATH","Start the Docker daemon / Docker Desktop before building","In CI, add a docker-in-docker service or install podman in the job image","Verify with 'docker info' (or 'podman info') that the runtime responds","Use a remote/alternate runtime via quarkus.container-image.* configuration if local docker is impossible"],"exampleFix":"// before (CI job without docker)\n./mvnw package -Dquarkus.container-image.build=true\n// after (GitLab CI with dind service)\nservices: ['docker:dind']\nvariables:\n  DOCKER_HOST: tcp://docker:2376","handlingStrategy":"validation","validationCode":"boolean runtimeAvailable(String... cmds) {\n    for (String cmd : cmds) {\n        try {\n            Process p = new ProcessBuilder(cmd, \"info\").redirectErrorStream(true).start();\n            if (p.waitFor(30, java.util.concurrent.TimeUnit.SECONDS) && p.exitValue() == 0) return true;\n        } catch (Exception ignored) { }\n    }\n    return false;\n}\n// call: runtimeAvailable(\"docker\", \"podman\")","typeGuard":"boolean isDockerUsable() throws IOException, InterruptedException {\n    Process p = new ProcessBuilder(\"docker\", \"info\").start();\n    return p.waitFor() == 0;\n}","tryCatchPattern":"try {\n    buildContainerImage();\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"check your\")) {\n        throw new IllegalStateException(\"Install/start Docker or Podman before building images\", e);\n    }\n    throw e;\n}","preventionTips":["Run 'docker info' as a pre-build sanity check in CI","Add a docker:dind service or install podman in CI images","Keep Docker Desktop running before local image builds","Add the CI user to the docker group or use rootless podman"],"tags":["docker","podman","container-runtime","environment"],"backgroundTag":"container-runtime-unavailable","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}