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

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

type/bug
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

Dominant language
Java
Stars
8.8k
Forks
2k
Avg merge
2d 1h
Merged PRs (30d)
11

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from testcontainers/testcontainers-java

All issues in testcontainers/testcontainers-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.