-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve OOB experience by consistently using full container names #5275
Comments
Required to solve porblems with podman and windows. See testcontainers/testcontainers-java#5275 for details
Required to solve porblems with podman and windows. See testcontainers/testcontainers-java#5275 for details
@kiview I hope you remember our quick chat about this at Devoxx UK :) You mentioned this would be harder than it looks and would explore some things; do you have an updated by any chance? I'd really like to see some progress here: experienced developers figure it out, but I have the impression there's many beginners struggling because of this... podman is getting very popular. |
I remember our discussion, thanks for the ping @Sanne 😉 . I think just touching the image name of the Btw., AFAIK this is not a problem we have encountered so far on Docker Desktop on Windows. |
Yes I think simply chaging the string that points to ryuk would prevent some pain, and I also don't expect that to be problematic. Interesting that Docker Desktop doesn't have this problem in Windows - that's good to hear, I guess what I heard was from a confused user. But we definitely have this problem on Linux, especially with podman as it comes with multiple repositories configured by default. Thanks! |
As I see it, Podman now provides the |
Hello,
we've had Quarkus users complaining about unreliable & inconsistent bootstrap of containers via Testcontainers; a general pattern was that they were either using
podman
or usingWindows
, and out of the box configurations.I finally figured that the reason is that when the container engine is configured with multiple registries, when a container is instantiated using the "short name" like e.g.
testcontainers/ryuk:0.3.3
there is ambiguity; when attempting to fetch such a container from an interactive shell, the system will ask:podman run testcontainers/ryuk:0.3.3
But when executing the equivalent command from Testcontainers there is no TTY, so the request will fail:
N.B.
podman system reset
(or docker equivalent) to verify.~/.cache/containers/short-name-aliases.conf
ImagePullTest
is using fullnames exclusively to test the ability to download ryuk. This implies that running the testsuite on any machine will ensure the image is then cached and this will hide any subsequent problem with it on the same machine.Solution
The solution is trivial: ensure that all container image names are being declared with full names. E.g. adapt the string constants like
testcontainers/ryuk:0.3.3
toquay.io/testcontainers/ryuk:0.3.3
inorg.testcontainers.utility.TestcontainersConfiguration
; most likely other container names also need to be patched (and that's why I don't send a PR myself... I only stumbled on the particular issue of ryuk images - I'd be happy to patch that myself but I'm not familiar enough with the codebase to ensure I'm finding all such instances).I've already ensured that container names hardcoded in Quarkus, Hibernate ORM, Hibernate Reactive are consistently using full names; still this issue had eluded us so far as apparently we regularly use
TESTCONTAINERS_RYUK_DISABLED=true
, which would also prevent the particular issue with the ryuk container.More background about the naming issue is described here:
The text was updated successfully, but these errors were encountered: