jib
jib copied to clipboard
Image labels appear in the extra directory layer manifest
Environment:
- Jib version: 3.4.2 for Mac, 3.4.3 for Linux
- Build tool: Gradle 8.8
- OS: MacOS, Ubuntu
Description of the issue:
Container labels (jib.container.labels), in addition to the image descriptor, appear in the manifest of the extra directory layer.
When using non-constant values, this causes the layer digest to change.
Expected behavior: Labels are listed only in the image descriptor.
Steps to reproduce:
- Build https://github.com/sgashchenko-tempo/jib-extra-dir-labels
- Check the extra directory layer manifest
jib-gradle-plugin Configuration:
jib {
from {
image = "eclipse-temurin:17-jre-alpine"
}
to {
image = "jib-extra-dir-labels:latest"
}
extraDirectories {
paths {
path {
setFrom(layout.projectDirectory.dir("extra-dir"))
}
}
}
container {
labels.put("some-label", "some-value")
}
}
It looks like this behavior is consistent with docker build.
@sgashchenko-tempo can you please confirm if the issue still exists?
@sgashchenko-tempo, just bumping @ldetmer's question: does this still happen with Jib 3.4.6?