public static List<String> extractBaseImages(File dockerFile, FixedStringSearchInterpolator interpolator, Map<String, String> argsFromBuildConfig) throws IOException {
        List<String[]> fromLines = extractLines(dockerFile, "FROM", interpolator);
        Map<String, String> args = extractArgs(dockerFile, argsFromBuildConfig, interpolator);
        Set<String> result = new LinkedHashSet<>();
        Set<String> fromAlias = new HashSet<>();
        for (String[] fromLine :  fromLines) {
            if (fromLine.length > 1) {
                String from = extractValidFromLine(fromLine);
                if (!fromAlias.contains(from)) {
                    // Image is NOT referring to an already declared alias
                    result.add(resolveImageTagFromArgs(from, args));
                }
                if (fromLine.length == 4) { // FROM image:tag AS alias use case
                    // Image alias is declared - track it
                    fromAlias.add(resolveImageTagFromArgs(fromLine[3], args));
                }
            }
        }
        return new ArrayList<>(result);
    }
Extract the base images from a dockerfile. All lines containing a <code>FROM</code> is
taken.

@param dockerFile file from where to extract the base image
@param interpolator interpolator for replacing properties
@return LinkedList of base images name or empty collection if none is found.
src/main/java/io/fabric8/maven/docker/util/DockerFileUtil.java