testcontainers / testcontainers/testcontainers-java

[Bug]: Fully qualified image names are considered "incompatible"

Open
#9,958 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Module

PostgreSQL

Testcontainers version

1.17.6

Using the latest Testcontainers version?

Yes

Host OS

n/a

Host Arch

n/a

Docker version
n/a
What happened?

Trying to use fully qualified names makes Testcontainers think it's an incompatible image

Relevant log output
IllegalStateException: Failed to verify that image 'docker.io/postgres:16-alpine' is a compatible substitute for 'postgres'.



IllegalStateException: Failed to verify that image 'docker.io/library/postgres:16-alpine' is a compatible substitute for 'postgres'.



IllegalStateException: Failed to verify that image 'library/postgres:16-alpine' is a compatible substitute for 'postgres'.
Additional Information

Testcontainers should be using docker.io/library/postgres as the actual expected image name.

Shorthand image names should be handled by adding the default docker.io/library/ prefix

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

Start by reproducing the compatibility check with the fully qualified image names shown in the logs, then trace the image-name validation and substitution path. Done means docker.io/postgres, docker.io/library/postgres, and library/postgres forms are accepted as substitutes for postgres, with shorthand names normalized to docker.io/library/postgres.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
testing-qa
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.