{"record":{"id":"63926ac2d65bcb5d","repo":"quarkusio/quarkus","slug":"specified-dockerfile-path-s-does-not-exist","errorCode":null,"errorMessage":"Specified Dockerfile path %s does not exist","messagePattern":"Specified Dockerfile path (.+?) does not exist","errorType":"console","errorClass":"IllegalArgumentException","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":432,"sourceCode":"            }\n\n            return new AbstractMap.SimpleEntry<>(dockerfilesRoot, mainSourcesRoot.getValue());\n        }\n    }\n\n    protected record ProvidedDockerfile(Path dockerfilePath, Path dockerExecutionPath) implements DockerfilePaths {\n        protected static DockerfilePaths get(Path dockerfilePath, Path outputDirectory) {\n            var mainSourcesRoot = findMainSourcesRoot(outputDirectory);\n\n            if (mainSourcesRoot == null) {\n                throw new IllegalStateException(\"Unable to determine project root\");\n            }\n\n            var executionPath = mainSourcesRoot.getValue();\n            var effectiveDockerfilePath = dockerfilePath.isAbsolute() ? dockerfilePath : executionPath.resolve(dockerfilePath);\n\n            if (!effectiveDockerfilePath.toFile().exists()) {\n                throw new IllegalArgumentException(\n                        \"Specified Dockerfile path %s does not exist\".formatted(effectiveDockerfilePath.toAbsolutePath()));\n            }\n\n            return new ProvidedDockerfile(effectiveDockerfilePath, executionPath);\n        }\n    }\n}\n","sourceCodeStart":414,"sourceCodeEnd":440,"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#L414-L440","documentation":"ProvidedDockerfile.get() validates the Dockerfile configured via quarkus.container-image.docker.dockerfile-jvm-path (or -native-path). Relative paths are resolved against the main sources root; if the resolved (or absolute) path does not exist on disk, it throws this IllegalArgumentException with the absolute path in the message.","triggerScenarios":"Setting quarkus.container-image.docker.dockerfile-jvm-path / dockerfile-native-path to a file that does not exist, a relative path that resolves to the wrong directory (it is relative to src/main, not the project root), or a typo in the filename.","commonSituations":"Assuming the path is relative to the project root when it is relative to src/main (so 'docker/Dockerfile' works but 'src/main/docker/Dockerfile' fails); renaming the file but not the config; absolute path pointing to a machine-specific location that is absent in CI.","solutions":["Fix the configured path: relative values are resolved from src/main, so use 'docker/Dockerfile' not 'src/main/docker/Dockerfile'","Verify the file exists at the absolute path printed in the error message","Use an absolute path in CI if the file lives outside the project","Correct typos/case-sensitivity in the filename"],"exampleFix":"# before (wrong base dir)\nquarkus.container-image.docker.dockerfile-jvm-path=src/main/docker/Dockerfile.custom\n# after\nquarkus.container-image.docker.dockerfile-jvm-path=docker/Dockerfile.custom","handlingStrategy":"validation","validationCode":"String configured = \"src/main/docker/Dockerfile.custom\"; // value of dockerfile-jvm-path\nPath srcMain = Path.of(\"src/main\");\nPath effective = Paths.get(configured).isAbsolute() ? Paths.get(configured) : srcMain.resolve(configured);\nif (!Files.isRegularFile(effective)) {\n    throw new IllegalStateException(\"Configured Dockerfile not found at \" + effective.toAbsolutePath());\n}","typeGuard":"boolean configuredDockerfileExists(String path, Path sourcesRoot) {\n    Path p = Paths.get(path);\n    return (p.isAbsolute() ? p : sourcesRoot.resolve(p)).toFile().exists();\n}","tryCatchPattern":"try {\n    buildImage();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"Specified Dockerfile path\")) {\n        // correct quarkus.container-image.docker.dockerfile-jvm-path and retry\n    } else throw e;\n}","preventionTips":["Remember relative dockerfile paths resolve from src/main, not the project root","Verify the configured file exists before running image builds (ls at the absolute path in the error)","Use absolute paths in CI when the Dockerfile lives outside the project","Avoid typos and keep filename case consistent (Linux is case-sensitive)"],"tags":["docker","dockerfile","configuration","path-resolution"],"backgroundTag":"dockerfile-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}