public Optional<ContainerConfigurationTemplate> getContainerConfiguration() {
    try {
      if (history.isEmpty()) {
        return Optional.empty();
      }
      String v1Compatibility = history.get(0).v1Compatibility;
      if (v1Compatibility == null) {
        return Optional.empty();
      }

      return Optional.of(
          JsonTemplateMapper.readJson(v1Compatibility, ContainerConfigurationTemplate.class));
    } catch (IOException ex) {
      // not a container configuration; ignore and continue
      return Optional.empty();
    }
  }
Attempts to parse the container configuration JSON (of format {@code
application/vnd.docker.container.image.v1+json}) from the {@code v1Compatibility} value of the
first {@code history} entry, which corresponds to the latest layer.

@return container configuration if the first history string holds it; {@code null} otherwise
jib-core/src/main/java/com/google/cloud/tools/jib/image/json/V21ManifestTemplate.java