You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Fully qualified image names are considered "incompatible" #9958
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
changed the title [-][Bug]: Fully qualified image names are considered "incompatibile"[/-][+][Bug]: Fully qualified image names are considered "incompatible"[/+]on Feb 13, 2025
Just encountered this issue. As a Podman user, I use the full image name (docker.io/postgres:18-alpine) which is considered incompatible. Testcontainers should ignore the docker.io part
I'd like to take this one. The library/ prefix case is handled now, and #11922 makes that check stricter. An explicit docker.io/ or index.docker.io/ registry is still rejected, though: DockerImageName.parse("docker.io/postgres:16-alpine").assertCompatibleWith(DockerImageName.parse("postgres")) throws on current main.
I have a small fix ready, with tests. Before comparing, isCompatibleWith drops a Docker Hub registry (docker.io / index.docker.io) from both names. Repository and tag checks stay the same, and other registries are still compared exactly. I'll open a PR shortly.
Activity
[-][Bug]: Fully qualified image names are considered "incompatibile"[/-][+][Bug]: Fully qualified image names are considered "incompatible"[/+]eddumelendez commentedon Mar 12, 2025
library/postgresis a valid image. Take into account version 1.17.6 is an old version.cyyynthia commentedon May 29, 2026
Just encountered this issue. As a Podman user, I use the full image name (
docker.io/postgres:18-alpine) which is considered incompatible. Testcontainers should ignore thedocker.iopartR4ng3r commentedon Dec 5, 2026
I'd like to take this one. The
library/prefix case is handled now, and #11922 makes that check stricter. An explicitdocker.io/orindex.docker.io/registry is still rejected, though:DockerImageName.parse("docker.io/postgres:16-alpine").assertCompatibleWith(DockerImageName.parse("postgres"))throws on currentmain.I have a small fix ready, with tests. Before comparing,
isCompatibleWithdrops a Docker Hub registry (docker.io/index.docker.io) from both names. Repository and tag checks stay the same, and other registries are still compared exactly. I'll open a PR shortly.