Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image labels appear in the extra directory layer manifest #4315

Open
sgashchenko-tempo opened this issue Sep 25, 2024 · 2 comments
Open

Image labels appear in the extra directory layer manifest #4315

sgashchenko-tempo opened this issue Sep 25, 2024 · 2 comments

Comments

@sgashchenko-tempo
Copy link

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.

image.json
layer.json

Expected behavior:
Labels are listed only in the image descriptor.

Steps to reproduce:

  1. Build https://github.com/sgashchenko-tempo/jib-extra-dir-labels
  2. 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")
  }
}
@sgashchenko-tempo
Copy link
Author

It looks like this behavior is consistent with docker build.

@ldetmer
Copy link

ldetmer commented Nov 21, 2024

@sgashchenko-tempo can you please confirm if the issue still exists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants