The Initializ Buildpack for Image Labels is a Cloud Native Buildpack that enables configuration of labels on the created images.
buildpack allows for the configuration of both OCI-specified labels with short environment variable names, as well as arbitrary labels using a space-delimited syntax in a single environment variable.
This buildpack will participate if any of the following conditions are met
$BP_IMAGE_LABELSis set$BP_OCI_AUTHORSis set$BP_OCI_CREATEDis set$BP_OCI_DESCRIPTIONis set$BP_OCI_DOCUMENTATIONis set$BP_OCI_LICENSESis set$BP_OCI_REF_NAMEis set$BP_OCI_REVISIONis set$BP_OCI_SOURCEis set$BP_OCI_TITLEis set$BP_OCI_URLis set$BP_OCI_VENDORis set$BP_OCI_VERSIONis set
The buildpack will do the following:
- If
$BP_IMAGE_LABELSis set, it will split the value first along, then along=, respecting quotes and set each of the pairs as image labels - If
$BP_OCI_AUTHORSis set, it will set the value as theorg.opencontainers.image.authorsimage label - If
$BP_OCI_CREATEDis set, it will set the value as theorg.opencontainers.image.createdimage label - If
$BP_OCI_DESCRIPTIONis set, it will set the value as theorg.opencontainers.image.descriptionimage lable - If
$BP_OCI_DOCUMENTATIONis set, it will set the value as theorg.opencontainers.image.documentationimage label - If
$BP_OCI_LICENSESis set, it will set the value as theorg.opencontainers.image.licensesimage label - If
$BP_OCI_REF_NAMEis set, it will set the value as theorg.opencontainers.image.ref.nameimage label - If
$BP_OCI_REVISIONis set, it will set the value as theorg.opencontainers.image.revisionimage label - If
$BP_OCI_SOURCEis set, it will set the value as theorg.opencontainers.image.sourceimage label - If
$BP_OCI_TITLEis set, it will set the value as theorg.opencontainers.image.titleimage label - If
$BP_OCI_URLis set, it will set the value as theorg.opencontainers.image.urlimage label - If
$BP_OCI_VENDORis set, it will set the value as theorg.opencontainers.image.vendorimage label - If
$BP_OCI_VERSIONis set, it will set the value as theorg.opencontainers.image.versionimage label
| Environment Variable | Description |
|---|---|
$BP_IMAGE_LABELS |
A collection of space-delimited key-value pairs (e.g. alpha=bravo charlie="delta echo") to be set as image labels. Values containing spaces can be quoted. |
$BP_OCI_AUTHORS |
The value for the org.opencontainers.image.authors image label |
$BP_OCI_CREATED |
The value for the org.opencontainers.image.created image label |
$BP_OCI_DESCRIPTION |
The value for the org.opencontainers.image.description image label |
$BP_OCI_DOCUMENTATION |
The value for the org.opencontainers.image.documentation image label |
$BP_OCI_LICENSES |
The value for the org.opencontainers.image.licenses image label |
$BP_OCI_REF_NAME |
The value for the org.opencontainers.image.ref.name image label |
$BP_OCI_REVISION |
The value for the org.opencontainers.image.revision image label |
$BP_OCI_SOURCE |
The value for the org.opencontainers.image.source image label |
$BP_OCI_TITLE |
The value for the org.opencontainers.image.title image label |
$BP_OCI_URL |
The value for the org.opencontainers.image.url image label |
$BP_OCI_VENDOR |
The value for the org.opencontainers.image.vendor image label |
$BP_OCI_VERSION |
The value for the org.opencontainers.image.version image label |
This buildpack is released under version 2.0 of the Apache License.