private static File prepareAbsolutePath(File projectBaseDir, String directory, String path) {
        File file = new File(path);
        if (file.isAbsolute()) {
            return file;
        }

        File baseDir = new File(directory);
        if (!baseDir.isAbsolute()) {
            baseDir = new File(projectBaseDir, directory);
        }

        return new File(baseDir, path);
    }
Return the first non null registry given. Use the env var DOCKER_REGISTRY as final fallback
@param checkFirst list of registries to check
@return registry found or null if none.
src/main/java/io/fabric8/maven/docker/util/EnvUtil.java