testcontainers / testcontainers/testcontainers-java

Parse Docker images of `<name>:<tag>@sha256:<hash>` format

Open
#4,762 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Currently, DockerImageName doesn't support image names in <name>:<tag>@sha256:<hash> format, as it expects image name to be in one of these formats:

  • <name>:<tag>
  • <name>@sha256:<hash>

However, <name>:<tag>@sha256:<hash> is a valid Docker image name format. Could you please add its support?

As a result, I expect DockerImageName to ignore tags of such image names and work with hash only. Tags can be returned via toString().

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the DockerImageName parser and its existing tests for tag-only and digest-only formats. Start by tracing how the name and digest are parsed, then verify the combined name:tag@sha256:hash form is accepted, tags are ignored for lookup, and toString() preserves them. Add or update focused parser tests to demonstrate the completed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.