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

Give access to Image ID #933

Closed
remmeier opened this issue Sep 5, 2018 · 8 comments
Closed

Give access to Image ID #933

remmeier opened this issue Sep 5, 2018 · 8 comments

Comments

@remmeier
Copy link

remmeier commented Sep 5, 2018

Docker v1.10 introduced a content/digest-based image ID to uniquely identify docker images. It would be great if this image ID would be available from the gradle (and maybe maven) plugin after the image has been built or is deemed being already up-to-date.

Having the image ID would, for example, let the subsequent deployment processes skip containers that do not change (without having to resolve tags to image ids or workaround with manual mechanisms). This is of particular importance for larger multi-project gradle setups / single repository approaches where a single build manages multiple images.

@coollog coollog added this to the v0.10.0 milestone Sep 5, 2018
@coollog
Copy link
Contributor

coollog commented Oct 2, 2018

Hi @remmeier , after some discussions over how to provide the user with the digest output, we are planning to have the Jib tasks/goals output a jib-image.digest into the build output directory (build/jib-image.digest for Gradle/target/jib-image.digest for Maven). This file will contain the container image digest. Will this be adequate for your use case?

@remmeier
Copy link
Author

remmeier commented Oct 3, 2018

yes thx, that would be a great help.

@briandealwis briandealwis self-assigned this Oct 10, 2018
@briandealwis
Copy link
Member

Just so I'm clear @coollog, you are proposing we write out the manifest digest (type application/vnd.docker.distribution.manifest.v2+json, not the container configuration digest (type application/vnd.docker.container.image.v1+json)?

(docker images --digests reports the container configuration digests as the Image ID, and the manifest digest as Digest. The manifest references the container configuration as config.digest.)

@coollog
Copy link
Contributor

coollog commented Oct 16, 2018

Yes, the manifest digest, which is the digest portion of the image reference if it's qualified with a digest (ie. gcr.io/distroless/java@sha256:bb1c9179c2263733f235291998cb849d52fb730743125420cf4f97a362d6a6dd where sha256:bb1c9179c2263733f235291998cb849d52fb730743125420cf4f97a362d6a6dd is the image digest.

@coollog
Copy link
Contributor

coollog commented Oct 29, 2018

Hmm, maybe we should write out jib-image.id as well. @remmeier Do you happen to need the Docker Image ID (config digest) or is the image digest enough?

@remmeier
Copy link
Author

thx a lot! I'm ok with either. i could imagine that some people may expect the docker image id as it is well establusged

@coollog
Copy link
Contributor

coollog commented Oct 29, 2018

Filed #1204 for that!

@coollog
Copy link
Contributor

coollog commented Nov 9, 2018

Hi @remmeier , @sdavids, @novotnyr, @keykey7, @Tanmayshetty, version 0.10.0 has been released with the image digest written out to a jib-image.digest file in the build output directory.

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