public static String interpolate(File dockerFile, FixedStringSearchInterpolator interpolator) throws IOException {
        StringBuilder ret = new StringBuilder();
        try (BufferedReader reader = new BufferedReader(new FileReader(dockerFile))) {
            String line;
            while ((line = reader.readLine()) != null) {
                ret.append(interpolator.interpolate(line)).append(System.lineSeparator());
            }
        }
        return ret.toString();
    }
Interpolate a docker file with the given properties and filter

@param dockerFile docker file to interpolate
@param interpolator interpolator for replacing properties
@return The interpolated contents of the file.
@throws IOException
src/main/java/io/fabric8/maven/docker/util/DockerFileUtil.java