Thanks to visit codestin.com
Credit goes to github.com

Skip to content

image digests TODOs and bugs #531

@runcom

Description

@runcom

@nalind @mtrmac here's the situation:

  • when pulling an image by tag we need to always store the digested reference along with the tag (same as docker does)
  • we don't have a RepoDigests for ImageStatus and we just fill RepoTags with status.Names which just contains tagged references for that image
  • (guess what) we need RepoDigests slice
  • digests must not be stored and shown as the ID of an image (see reproducer 1). The image ID in docker is the digest of its config blob which should be unique due to content addressability!
  • if you pull an image by digest corresponding to a tag different than latest image list reports that it has a :latest tag whether that's not true at all (see reproducer 2)
  • image ID should be the config blob digest!

--

reproducer 1 (digest shown as image ID, the image ID should be the config digest blob!):

$ crioctl image pull nginx@sha256:4aacdcf186934dcb02f642579314075910f1855590fd3039d8fa4c9f96e48315
$ crioctl image list
ID: 4aacdcf186934dcb02f642579314075910f1855590fd3039d8fa4c9f96e48315
Tag: docker.io/library/nginx:latest

--

reproducer 2 (wrong tag applied to a digested image, there should not be any tag for this image unless someone has previously pulled the same image by tag, in which case we already have the digest as well):

# this is the digest for redis:alpine but redis:latest is shown below, incorrectly
# notice how the same issue as reproducer 1 is shown below (ID != digest)
$ crioctl image pull redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b
$ crioctl image list
ID: 03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b
Tag: docker.io/library/redis:latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions