{"record":{"id":"df432f644a6ca257","repo":"quarkusio/quarkus","slug":"specified-dockerfile-s-is-not-a-normal-file","errorCode":null,"errorMessage":"Specified Dockerfile: '%s' is not a normal file.","messagePattern":"Specified Dockerfile: '(.+?)' is not a normal file\\.","errorType":"console","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/ApplyDockerfileToBuildConfigDecorator.java","lineNumber":35,"sourceCode":"\npublic class ApplyDockerfileToBuildConfigDecorator extends NamedResourceDecorator<BuildConfigSpecFluent<?>> {\n\n    private final Path pathToDockerfile;\n\n    public ApplyDockerfileToBuildConfigDecorator(String name, Path pathToDockerfile) {\n        super(name);\n        validate(pathToDockerfile);\n        this.pathToDockerfile = pathToDockerfile;\n    }\n\n    private void validate(Path pathToDockerfile) {\n        File file = pathToDockerfile.toFile();\n        if (!file.exists()) {\n            throw new IllegalArgumentException(\n                    \"Specified Dockerfile: '\" + pathToDockerfile.toAbsolutePath().toString() + \"' does not exist.\");\n        }\n        if (!file.isFile()) {\n            throw new IllegalArgumentException(\n                    \"Specified Dockerfile: '\" + pathToDockerfile.toAbsolutePath().toString() + \"' is not a normal file.\");\n        }\n\n        try {\n            Stream<String> lines = Files.lines(pathToDockerfile);\n            Optional<String> fromLine = lines.filter(l -> !l.startsWith(\"#\")).map(String::trim)\n                    .filter(l -> l.startsWith(\"FROM\")).findFirst();\n            if (!fromLine.isPresent()) {\n                throw new IllegalArgumentException(\"Specified Dockerfile: '\" + pathToDockerfile.toAbsolutePath().toString()\n                        + \"' does not contain a FROM directive\");\n            }\n        } catch (IOException e) {\n            throw new IllegalArgumentException(\n                    \"Unable to validate specified Dockerfile: '\" + pathToDockerfile.toAbsolutePath().toString() + \"'\");\n        }\n    }\n\n    @Override","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/container-image/container-image-openshift/deployment/src/main/java/io/quarkus/container/image/openshift/deployment/ApplyDockerfileToBuildConfigDecorator.java#L17-L53","documentation":"The same validate() method also requires the Dockerfile path to be a regular file (File.isFile()). Directories, special files (sockets, devices) and other non-regular entries are rejected with IllegalArgumentException(\"Specified Dockerfile: '<path>' is not a normal file.\").","triggerScenarios":"quarkus.openshift.dockerfile points at a directory (e.g. the docker/ directory itself) or a special/non-regular filesystem entry instead of the Dockerfile file.","commonSituations":"Pointing the config at src/main/docker (directory) instead of src/main/docker/Dockerfile; multi-stage setups where the config value was copied from a directory property; symlink loops resolving to non-regular files.","solutions":["Point quarkus.openshift.dockerfile at the Dockerfile file itself, not its parent directory","Verify with ls -l that the target is a regular file (-)","If using a symlink, confirm it resolves to a regular file"],"exampleFix":"// before\nquarkus.openshift.dockerfile=src/main/docker\n// after\nquarkus.openshift.dockerfile=src/main/docker/Dockerfile","handlingStrategy":"validation","validationCode":"java.nio.file.Path df = java.nio.file.Path.of(dockerfileConfig);\nif (java.nio.file.Files.isDirectory(df)) {\n    throw new IllegalStateException(\"quarkus.openshift.dockerfile must point to the file, not a directory: \" + df);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Point the config at the Dockerfile file, never its parent directory","Run ls -l to confirm the target is a regular file","Don't reuse directory-type config values for file-type properties"],"tags":["openshift","dockerfile","configuration","validation"],"backgroundTag":"invalid-config-path","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"}