private File findDockerFileFile(Logger log) {
        if(dockerFileDir != null && contextDir != null) {
            log.warn("Both contextDir (%s) and deprecated dockerFileDir (%s) are configured. Using contextDir.", contextDir, dockerFileDir);
        }

        if (dockerFile != null) {
            File dFile = new File(dockerFile);
            if (dockerFileDir == null && contextDir == null) {
                return dFile;
            }
            if(contextDir != null) {
                if (dFile.isAbsolute()) {
                    return dFile;
                }
                return new File(contextDir, dockerFile);
            }
            if (dFile.isAbsolute()) {
                throw new IllegalArgumentException("<dockerFile> can not be absolute path if <dockerFileDir> also set.");
            }
            log.warn("dockerFileDir parameter is deprecated, please migrate to contextDir");
            return new File(dockerFileDir, dockerFile);
        }

        if (contextDir != null) {
            return new File(contextDir, "Dockerfile");
        }

        if (dockerFileDir != null) {
            return new File(dockerFileDir, "Dockerfile");
        }

        // TODO: Remove the following deprecated handling section
        if (dockerArchive == null) {
            Optional<String> deprecatedDockerFileDir =
                    getAllAssemblyConfigurations().stream()
                            .map(AssemblyConfiguration::getDockerFileDir)
                            .filter(Objects::nonNull)
                            .findFirst();
            if (deprecatedDockerFileDir.isPresent()) {
                log.warn("<dockerFileDir> in the <assembly> section of a <build> configuration is deprecated");
                log.warn("Please use <dockerFileDir> or <dockerFile> directly within the <build> configuration instead");
                return new File(deprecatedDockerFileDir.get(),"Dockerfile");
            }
        }

        // No dockerfile mode
        return null;
    }
Use {@link #getAllAssemblyConfigurations()} unless you specifically want the configuration defined only by <code>assemblies</code>.
src/main/java/io/fabric8/maven/docker/config/BuildImageConfiguration.java