Class AddOciLabels

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.docker.AddOciLabels
All Implemented Interfaces:
Cloneable

public class AddOciLabels extends org.openrewrite.Recipe
Adds standard OCI (Open Container Initiative) image labels to a Dockerfile.

OCI defines a standard set of labels for container images that provide metadata such as the image title, description, version, creation time, source repository, and license information.

The standard labels are prefixed with org.opencontainers.image. and include:

  • title - Human-readable title of the image
  • description - Human-readable description of the image
  • version - Version of the packaged software
  • created - Date and time the image was built (RFC 3339)
  • revision - Source control revision identifier
  • source - URL to get source code for building the image
  • url - URL to find more information about the image
  • vendor - Name of the distributing entity, organization, or individual
  • licenses - License(s) under which contained software is distributed
  • authors - Contact details of the people or organization responsible
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.openrewrite.Recipe

    org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe
  • Field Summary

    Fields inherited from class org.openrewrite.Recipe

    contributors, examples, PANIC
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    List<org.openrewrite.Recipe>
     
    org.openrewrite.Validated<Object>
     

    Methods inherited from class org.openrewrite.Recipe

    addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getTags, getVisitor, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validateAll, validateAll, withOptions

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AddOciLabels

      public AddOciLabels()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.openrewrite.Recipe
    • validate

      public org.openrewrite.Validated<Object> validate()
      Overrides:
      validate in class org.openrewrite.Recipe
    • getRecipeList

      public List<org.openrewrite.Recipe> getRecipeList()
      Overrides:
      getRecipeList in class org.openrewrite.Recipe