private List<String> read() {
        if (!Files.exists(dockerFilePath)) {
            log.warn("Tried to parse Dockerfile at path {} but none was found", dockerFilePath);
            return Collections.emptyList();
        }

        try {
            return Files.readAllLines(dockerFilePath);
        } catch (IOException e) {
            log.warn("Unable to read Dockerfile at path {}", dockerFilePath, e);
            return Collections.emptyList();
        }
    }
Representation of a Dockerfile, with partial parsing for extraction of a minimal set of data.
core/src/main/java/org/testcontainers/images/ParsedDockerfile.java