-
-
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
[Bug]: Test containers fails to pull image with podman #5998
Comments
The workaround mentioned in #5612 (comment) is valid for this issue, correct? |
@fedinskiy thanks for the clarification. In this case, I think the podman behavior with regards to #5275 is in play here. However, I am surprised by it since I would assume that what you mention as step 1. should also help. Did you consider also raising the issue with the podman project? Because I believe, ideally podman would implement a compatibility setting, that makes it behave like Docker (which is clearly not the case here, hence the issue you observe). |
@kiview, yes, but could you describe, what are expected and actual responses of podman/Docker API in that case, or point me to the relevant class? |
Good point, this is actually an issue in https://github.com/docker-java/docker-java in this case and not in Testcontainers. Since I am not a podman user or expert and we as Testcontainers are consumers of |
@kiview from my point of view it is not really clear, where is an issue there. I see a 3 possible options there:
What do testcontainers/ |
After closer inspection, I found out, that if we use fully-qualified image names, then the error doesn't reproduce.
Hope, that help. |
Thanks, that's what is also mentioned in the linked issues, correct? Different behavior regarding I would suggest bringing this issue to podman, since the Docker compatibility mode clearly behaves differently than the actual Docker. Thanks a lot for your investigation into this. |
@kiview as I wrote before, first it would be nice to know, which one of three projects misbehaves there. As far as I understand, testcontainers do a (HTTP?) request to socket and receive(in this case), some unexpected response. Could you describe the request(s) and response(s) which are used during run of generic docker image? |
Since Testcontainers and docker-java work fine with Docker Desktop and Docker in general, Occam's razor would suggest Podman misbehaving there. This is in line with our findings from the experiments with Podman we did run in 2021: https://www.atomicjar.com/2021/10/docker-on-windows-and-macos/ We are happy to engage with the Podman community into helping them reach full Docker API compatibility, but we don't plan to currently invest more resources from our side. As mentioned above, this is also outlined in our Docker requirements. Therefore, I am going to close this issue, but we really appreciate your collaboration on this. |
Module
Core
Testcontainers version
1.17.5
Using the latest Testcontainers version?
Yes
Host OS
Linux, Fedora 36, 5.19.14-200.fc36.x86_64
Host Arch
x86
Docker version
What happened?
I have a code, which tries to start and stop container. If image, which I use, is not yet pulled by podman, then it fails with NPE, otherwise it succeeds.
How reproduce:
a. Change line
short-name-mode
setting inside of/etc/containers/registries.conf
into"disabled"
b. Change order of
unqualified-search-registries
in the same file, sodocker.io
would be the first onec. In file
/usr/share/containers/containers.conf
uncommentcompat_api_enforce_docker_hub = true
[email protected]:fedinskiy/reproducer.git -b reproducer/podman-nopull
podman rmi
to purgepostgres:9.6.12
andnginx:latest
export DOCKER_HOST=unix:///run/user/${UID}/podman/podman.sock && export TESTCONTAINERS_RYUK_DISABLED=true
reproducer
folder runmvn clean verify
. This will fail.podman pull postgress:9.6.12 && podman pull nginx:latest
[1] #5612
Relevant log output
Additional Information
Similar bug[2] was reported a year before, but it was flaky, has different error output and used older version of podman and testcontainers.
This[3] bug in podman may be related.
[2] #4440
[3] containers/podman#15306
The text was updated successfully, but these errors were encountered: