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

crane: GCR images are not up to date #1877

Open
matthew-muscat opened this issue Feb 16, 2024 · 8 comments · May be fixed by #2000
Open

crane: GCR images are not up to date #1877

matthew-muscat opened this issue Feb 16, 2024 · 8 comments · May be fixed by #2000
Labels
bug Something isn't working

Comments

@matthew-muscat
Copy link

Describe the bug

Crane docker images that are intended to be available at gcr.io/go-containerregistry/crane[version] and gcr.io/go-containerregistry/crane/debug:[version] are not currently up to date.

It would appear the most recent docker container release for the GCR registry is August 2023

The docker images are documented as being available via the GCR registry over at https://github.com/google/go-containerregistry/blob/8dadbe76ff8c20d0e509406f04b7eade43baa6c1/cmd/crane/README.md#images

To Reproduce

  1. Run the command docker run -it gcr.io/go-containerregistry/crane/debug:v0.19.0
  2. Observe the image not being pulled, as it does not exist

Or

  1. Navigate to gcr.io/go-containerregistry/crane/debug
  2. Sort the images by created date
  3. Observe the most recent image as occurring on 1st August, 2023

Expected behavior

Crane Images should be published to the GCR registries for each release

@matthew-muscat matthew-muscat added the bug Something isn't working label Feb 16, 2024
@matthew-muscat
Copy link
Author

Looks like this has been occurring for all releases from v0.16+

#1851
#1772

@jonjohnsonjr
Copy link
Collaborator

Almost certainly the CI/CD setup that publishes those images has bitrotted since I left Google, and I no longer have access to the GCP project that hosts the cloud build setup, sorry :/

Most of the people who used to maintain this repo now work at Chainguard, where we package a lot of open source software, including crane: https://cgr.dev/chainguard/crane

(I really don't mean for this to sound like a sales pitch.)

Downside here is that only the latest version is provided for free, but if you're okay with only the latest release, consider switching to that (and I recommend digestabot to control the updates).

If someone wants to migrate cloudbuild.yaml to GitHub Actions pushing to ghcr.io, I'd happily approve that as well. Maybe leave the existing cloudbuild.yaml in case someone with access wants to fix it.

Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@Jasper-Ben
Copy link

If someone wants to migrate cloudbuild.yaml to GitHub Actions pushing to ghcr.io, I'd happily approve that as well.

I might give it a shot, unless someone is already working on this?

Jasper-Ben added a commit to Jasper-Ben/go-containerregistry that referenced this issue Aug 16, 2024
Build container images on release and push them to ghcr.

Fixes: google#1877

Signed-off-by: Jasper Orschulko <[email protected]>
@Jasper-Ben
Copy link

Jasper-Ben commented Aug 16, 2024

@jonjohnsonjr I created a PR that should fix this and build & push container images to the ghcr during release. Only issue I am currently running into is that the container does not seem to pick up on the version:

$ docker run --rm ghcr.io/jasper-ben/go-containerregistry/crane version
(devel)

However, at least with the package installed from the arch package repository that is also the case. Could this be an unrelated issue?

Jasper-Ben added a commit to Jasper-Ben/go-containerregistry that referenced this issue Aug 16, 2024
Build container images on release and push them to ghcr.

Fixes: google#1877

Signed-off-by: Jasper Orschulko <[email protected]>
Jasper-Ben added a commit to Jasper-Ben/go-containerregistry that referenced this issue Aug 16, 2024
Build container images on release and push them to ghcr.

Fixes: google#1877

Signed-off-by: Jasper Orschulko <[email protected]>
@jonjohnsonjr
Copy link
Collaborator

Hm that's a little weird -- does it work if you try to use the Commit?

@Jasper-Ben
Copy link

Hm that's a little weird -- does it work if you try to use the Commit?

Tried that as well to no avail. I also checked the prebuilt binaries from the release page. They are returning the correct version 🤔

I am not too familiar with ko, but I think I used it correct here? ...

@Jasper-Ben
Copy link

The defaultBaseImage: gcr.io/distroless/base:debug setting in the debug image is picked up though, so the config is used during the build process:

$ docker run -it --rm --entrypoint=/busybox/sh ghcr.io/jasper-ben/go-containerregistry/crane:debug
/ #

Looking at the docs again, I think I might be using the builds config incorrect, i.e. maybe something with the path, causing the builds section not to be picked up. Not 100% sure though, will check tomorrow.

Jasper-Ben added a commit to Jasper-Ben/go-containerregistry that referenced this issue Aug 17, 2024
Build container images on release and push them to ghcr.

Fixes: google#1877

Signed-off-by: Jasper Orschulko <[email protected]>
Jasper-Ben added a commit to Jasper-Ben/go-containerregistry that referenced this issue Aug 17, 2024
Build container images on release and push them to ghcr.

Fixes: google#1877

Signed-off-by: Jasper Orschulko <[email protected]>
Jasper-Ben added a commit to Jasper-Ben/go-containerregistry that referenced this issue Aug 19, 2024
Build container images on release and push them to ghcr.
Update image locations in readme.
Update container image link on release page.

Fixes: google#1877

Signed-off-by: Jasper Orschulko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants