GoogleContainerTools / GoogleContainerTools/jib

Add support for specifying user-defined OCI Annotations

Open
#4,402 1 comment 8 reactions 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
Java
Stars
14.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

**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**:
```kotlin
jib {
container {
creationTime.set("USE_CURRENT_TIMESTAMP")
}
}
```

**Log output**:
N/A

**Additional Information**:
N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.