Skip to content

Image cache lookup should support SHA256 digests and Image IDs #1406

Open

Description

@rnorth

See #1391 (and this may be related to #699):

Testcontainers' image indexing code can't handle images that have SHA256 digests. We need a way to access the RepoDigests from docker-java's Image class. Unless I'm missing something, at the moment only RepoTags is mapped.

We would then modify RemoteDockerImage:

                List<Image> updatedImages = listImagesCmd.exec();
                updatedImages.stream()
                    .map(Image::getRepoTags)
                    .filter(Objects::nonNull)
                    .flatMap(Stream::of)
                    .map(DockerImageName::new)
                    .collect(Collectors.toCollection(() -> AVAILABLE_IMAGE_NAME_CACHE));

so that both Image::getRepoTags and Image::getRepoDigests are loaded into the cache. There's probably also some work to do around identity/equals/hashcode of DockerImageName objects in the cache.

EDIT 5 June 2020: We should also ensure that Image IDs are loaded into the cache - see #699.

Activity

  1. added 2 commits that reference this issue on Apr 15, 2019
  2. stale commented on Jul 14, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

  3. stale commented on Jul 28, 2019

    @stale

    This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case.

  4. reopened this on Oct 5, 2019
  5. changed the title [-]SHA256-versioned images cannot be used offline[/-] [+]Image cache lookup should support SHA256 digests and Image IDs[/+] on Jun 5, 2020
  6. britter commented on Jul 24, 2020

    @britter
    Contributor

    @rnorth we're still blocked by this from upgrading past 0.12.3. Any chance to get a fix for this?

  7. bsideup commented on Jul 24, 2020

    @bsideup
    Member

    @britter have you considered contributing a fix? You should have the most knowledge of the problem and how to fix it :)

  8. britter commented on Jul 27, 2020

    @britter
    Contributor

    @bsideup I had a look when I reported this initially and it was not clear to me how to fix this. I might have some time look at this again this week and come up with some more concrete questions.

  9. added a commit that references this issue on Mar 28, 2026
    c167524
  10. added a commit that references this issue on Apr 1, 2026
    dbc9031
  11. added a commit that references this issue on Aug 29, 2026
    bf4e967
  12. oualidbouh commented on Sep 15, 2026

    @oualidbouh

    Hi! I’m interested in contributing to this issue. I
    Is this issue still relevant with the current codebase? If so, I’d be happy to investigate it and work on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions