-
-
Notifications
You must be signed in to change notification settings - Fork 531
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]: Podman - Reaper creation fails #538
Comments
@baez90 could it be due to Line 64 in 6ba6e7a
|
I think that could be the reason for the reaper not being able to discover the containers in Podman. Would you be interested in contributing a fix? @baez90 please let us know what you think about @fpozzobon's discovery. |
@fpozzobon I'd be surprised if the network mode would be a problem regarding recognizing the correct Docker socket for the reaper. Can you probably provide some more environment information regarding how you configure the Docker socket path in your setup? It's a bit difficult for me to reproduce as I don't have a Mac 😅 |
I don't understand the original issue description. It is using Podman on MacOS, but Also Podman is running on |
@kiview thanks for your feedback, it is indeed confusing as Podman is actually running via Qemu on Macos (here a description of the architecture). |
I think I figured out (by chance) what might be a/the problem and now I also understand what @fpozzobon meant with the fixed bridge network 😄 although I'm really surprised that the current test suite doesn't cover that 😄 I'm not 100% sure if this is the only issue. @fpozzobon did you see something like this:
when you tried running your tests? I originally was confused by the
message. But that might also indicate that your environment is not 100% configured correctly 😅 |
I had the same issue with OP; and I recall seeing the error messages you quoted. Did you find a fix? |
Mac OS 12.6, got testcontainers-go and Ryuk working with Podman. Below are the crucial steps:
|
@yanghua-ola I think this is a great opportunity to improve our podman docs: https://golang.testcontainers.org/system_requirements/using_podman/ Would you willing to contribute it? |
Would be glad to, will raise a PR later |
fyi I found a way around to fix it for me by changing environment variables as follow:
and (sometimes?) make Podman rootful: |
Still not sure why it works but the |
One of these options should be sufficient. You either run all of Podman as root. (Which IMO is defeating the purpose of running Podman at all) Or you can run the Ryuk container in privileged mode only, via the given setting. I have tried this case and it works perfectly. |
Hi folks, reading through the conversation it seems that there are ways to achieve what's described in the issue (i.e. #538 (comment) and #538 (comment)) I'm closing it, although please feel free to reopen it if you consider it's not done yet 🙏 Thanks in advance. |
I'm sorry, but running podman in rootful mode kind of defeats the purpose of it. This is compromising security and in no way a "solution" |
Testcontainers version
0.14.0
Using the latest Testcontainers version?
Yes
Host OS
MacOs
Host Arch
amd64
Go Version
1.18
Docker version
Docker info
What happened?
When Skipping reaper, Podman works correctly, but when trying to create reaper getting error:
Error response from daemon: container create: statfs /var/run/docker.sock: permission denied: creating reaper failed: failed to create container
Relevant log output
Additional Information
It seems that something it missing on configuration to be able to create reaper using podman as part of this PR
The text was updated successfully, but these errors were encountered: