How to see (not download) docker image from ghcr.io

6.1k Views Asked by At

I am publishing docker images to GitHub container registry (ghcr.io).

The process of doing that:

  1. Build component.
  2. Build docker image which include component.
  3. Upload docker image to ghcr.io.
  4. Deploy docker image.
  5. Run integration tests on docker image.

Sometimes step 4 or 5 return an error which is not resolvable from within the Docker image, and after the issue is fixed, I need to redeploy and retest the artifact.

If this happens, the process of building the component, including junit tests, is a pain because the Docker image is already built and present on ghcr.io.

Is there a way I can see if a tagged Docker image is present in ghcr.io?

1

There are 1 best solutions below

1
On

The GHCR API is still in early development. Until it is fleshed out a bit more, you may have to resort to using skopeo to get what you need.

docker run --rm quay.io/skopeo/stable list-tags docker://ghcr.io/$GITHUB_REPOSITORY/$IMAGE_NAME