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

Log base image@digest when building #592

Merged
merged 3 commits into from
Feb 11, 2022
Merged

Conversation

imjasonh
Copy link
Member

Before:

2022/02/11 09:15:05 Using base golang:1.17 for github.com/google/ko

After:

2022/02/11 09:13:49 Using base golang:1.17 (index.docker.io/library/golang@sha256:1a35cc2c5338409227c7293add327ebe42e1ee5465049f6c57c829588e3f8a39) for github.com/google/ko

I couldn't tell where else to find the specific base image that was used before, without trying to guess using layer digests.

@imjasonh
Copy link
Member Author

imjasonh commented Feb 11, 2022

This could be shorter if the base image is specified by digest in .ko.yaml, I'm not sure how common that is in practice though.

edit: fixed

@mattmoor
Copy link
Collaborator

That's pretty long, I wonder if we should just emit the hash part, since the rest is redundant with something we're already printing on that line.

@imjasonh
Copy link
Member Author

That's pretty long, I wonder if we should just emit the hash part, since the rest is redundant with something we're already printing on that line.

Yeah, good call. Now it's just:

2022/02/11 09:53:26 Using base golang:1.17@sha256:1a35cc2c5338409227c7293add327ebe42e1ee5465049f6c57c829588e3f8a39 for github.com/google/ko

@imjasonh imjasonh merged commit f8d0aca into ko-build:main Feb 11, 2022
aknuds1 pushed a commit to grafana/ko that referenced this pull request Feb 16, 2022
* Log base image@digest when building

* Only log full digest if the original base wasn't already specified by digest

* Remove redundant image ref
aknuds1 pushed a commit to grafana/ko that referenced this pull request Feb 16, 2022
* Log base image@digest when building

* Only log full digest if the original base wasn't already specified by digest

* Remove redundant image ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants