testcontainers / testcontainers/testcontainers-java
Cannot use against local image Ids
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
For example, if using the output of --iidfile then the image is attempted to be fetched instead of using the existing local image Id:
Caused by: org.testcontainers.containers.ContainerFetchException: Retry limit reached while trying to pull image: sha256:8cf620617c6203b24af7c5bf15a7212386c27ad008fc4c6ff7e37a1bf0a3cdd2
at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:91)
at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:25)
at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:20)
at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:27)
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:839)
... 55 more
Caused by: com.github.dockerjava.api.exception.NotFoundException: {"message":"pull access denied for sha256, repository does not exist or may require 'docker login'"}
docker run --it --rm sha256:8cf620617c6203b24af7c5bf15a7212386c27ad008fc4c6ff7e37a1bf0a3cdd2 works as expected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with org.testcontainers.images.RemoteDockerImage, especially resolve, and reproduce the reported case using a local image ID from Docker's --iidfile output. Confirm that docker run accepts the sha256 image ID, then verify the completed behavior uses the existing local image instead of attempting a registry pull.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100