Skip to content

Add support for specifying user-defined OCI Annotations #4402

@markallanson

Description

@markallanson

Environment:

  • Jib version: Gradle Plugin version 3.4.5
  • Build tool: Gradle v8.10.1
  • OS: Any & All

Description of the feature:
Currently, JIB inserts a single static OCI annotation when building a container using the OCI ImageFormat, and there is no way for user defined annotations to be added to the built image.

It would be nice if OCI image formats could be customized with user defined annotations.

There would be 2 options for implementing this, as far as I could see.

  1. Derive manifest annotations from the existing labels (container.labels) that are already supported.
  2. A completely separate configuation (container.annotations).

In addition there would need to be some construct for allowing the specification of annotations at the index level.

I think either would be a workable solution, and don't personally have a preference or opinion one way or the other.

Expected behavior:
Jib supports the ability to emit user-defined annotations into an OCI formatted container image.

Steps to reproduce:
Not Applicable

jib-gradle-plugin Configuration:

jib {
    container {
        creationTime.set("USE_CURRENT_TIMESTAMP")
    }
}

Log output:
N/A

Additional Information:
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions