@Input
  @Optional
  public MapProperty<String, String> getLabels() {
    String labelsProperty = System.getProperty(PropertyNames.CONTAINER_LABELS);
    if (labelsProperty != null) {
      Map<String, String> parsedLabels =
          ConfigurationPropertyValidator.parseMapProperty(labelsProperty);
      if (!parsedLabels.equals(labels.get())) {
        labels.set(parsedLabels);
      }
    }
    return labels;
  }
A bean that configures properties of the container run from the image. This is configurable with
Groovy closures and can be validated when used as a task input.
jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/ContainerParameters.java