private Set<String> parse(List<String> lines) {
        Set<String> imageNames = lines
            .stream()
            .map(FROM_LINE_PATTERN::matcher)
            .filter(Matcher::matches)
            .map(matcher -> matcher.group("image"))
            .collect(Collectors.toSet());

        if (!imageNames.isEmpty()) {
            log.debug("Found dependency images in Dockerfile {}: {}", dockerFilePath, imageNames);
        }
        return imageNames;
    }
Representation of a Dockerfile, with partial parsing for extraction of a minimal set of data.
core/src/main/java/org/testcontainers/images/ParsedDockerfile.java