public static List<String[]> extractLines(File dockerFile, String keyword, FixedStringSearchInterpolator interpolator) throws IOException {
        List<String[]> ret = new ArrayList<>();
        try (BufferedReader reader = new BufferedReader(new FileReader(dockerFile))) {
            String line;
            while ((line = reader.readLine()) != null) {
                String lineInterpolated = interpolator.interpolate(line);
                String[] lineParts = lineInterpolated.split("\\s+");
                if (lineParts.length > 0 && lineParts[0].equalsIgnoreCase(keyword)) {
                    ret.add(lineParts);
                }
            }
        }
        return ret;
    }
Extract all lines containing the given keyword

@param dockerFile dockerfile to examine
@param keyword keyword to extract the lines for
@param interpolator interpolator for replacing properties
@return list of matched lines or an empty list
src/main/java/io/fabric8/maven/docker/util/DockerFileUtil.java