@Nonnull
    public static String resolveHomeReference(@Nonnull String path) {
        return path.startsWith("~/")
            ? Paths.get(getUserHome()).resolve(path.substring(2)).toString()
            : path;
    }
Resolve a path.  If path starts with '~/', resolve rest of path against the user's home directory.
@param path An absolute or relative path
@return If path starts with '~/', the absolute file path; otherwise, the input path
src/main/java/io/fabric8/maven/docker/util/EnvUtil.java