-
-
Notifications
You must be signed in to change notification settings - Fork 511
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]: Ryuk does not work with podman #2264
Comments
Running into the same issue. The test I used to recreate the issue looks like:
I'd expect it to fail with something hinting towards the image name being empty. The output is
using Podman 5.0.1 here:
|
I debugged a bit: The current auto-detection of Podman looks for "podman.sock" within the socket name. This works with Podman on Linux, but when using Setting
fixes the network configuration issue. Also the PR #1990 addresses this with a global configuration option. However this has been stale for a bit. Maybe the |
I ran into this issue on a setup similar to the original poster. @godart, I tried your fix, but I kept running into this issue:
I even tried setting my
Did you not run into this issue? |
We are having similar issues with 2024/05/09 11:11:09 github.com/testcontainers/testcontainers-go - Connected to docker:
Server Version: 24.0.9
API Version: 1.43
Operating System: Ubuntu 23.10
Total Memory: 1895 MB
Resolved Docker Host: unix:///Users/mohsan.abbas/.colima/default/docker.sock
Resolved Docker Socket Path: /Users/mohsan.abbas/.colima/default/docker.sock
Test SessionID: c1729139638928699b678e3fdc7dfff4e56482cc2310ee2358a09f68931641e0
Test ProcessID: e4f04ff7-5395-48a9-be14-51c54e9af8df
2024/05/09 11:11:09 🐳 Creating container for image testcontainers/ryuk:0.7.0
2024/05/09 11:11:09 ✅ Container created: 114d4680aa73
2024/05/09 11:11:09 🐳 Starting container: 114d4680aa73
2024/05/09 11:11:09 ✅ Container started: 114d4680aa73
2024/05/09 11:11:09 🚧 Waiting for container id 114d4680aa73 image: testcontainers/ryuk:0.7.0. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2024/05/09 11:11:09 failed accessing container logs: Error response from daemon: No such container: 114d4680aa73b82030172ccfe23cb81d4a7364beb7217e6fb2472cd716b0d055
--- FAIL: TestKafkaIntegration (0.57s)
kgo_test.go:182: Failed to start Kafka container: Error response from daemon: No such container: 114d4680aa73b82030172ccfe23cb81d4a7364beb7217e6fb2472cd716b0d055: could not start container: creating reaper failed: failed to create container
FAIL
|
Same here, tested with It fails 95% of the times in my case. Using
I tried changing the version of ryuk but got the same results. I debugged the process and found it fails here, between the Tested with the Quickstart example |
I finally tracked my error to something between "Mounts": [
{
"Type": "bind",
- "Source": "/var/run/docker.sock",
+ "Source": "/Users/nicanor.romero/.colima/docker.sock",
"Destination": "/var/run/docker.sock",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
], I found 2 fixes (I prefer the first one):
|
Option 1 is documented here https://golang.testcontainers.org/features/configuration/#docker-socket-path-detection, as part of the discovery mechanism. And Option 2 is documented here: https://golang.testcontainers.org/system_requirements/using_colima/ @dfioravanti if you agree, I think we can close this one, but please keep it open if you see it's not resolved with the recent versions of the project. Thanks! |
I tired again with
|
@dfioravanti in your tests, are you setting the Podman provider explicitly? This is required at the moment. With the work in #2810 that would be way simpler thanks to the support for docker contexts. But we are not there yet |
@dfioravanti I'm sorry, I responded very quick. It's Ryuk, not your own container the one you are interested in. I suggest you test it with that PR/branch, and verify it works as expected. |
Testcontainers version
0.28
Using the latest Testcontainers version?
Yes
Host OS
MacOs
Host arch
ARM
Go version
1.22
Docker version
Docker info
What happened?
I wanted to switch from docker-desktop to podman as docker provider on MacOs. Everything works but only if I disable ryuk. Otherwise testcontainer crashes at boot up with
Any idea how to fix this? I have tried everything that I can google, podman is run as rootful and the socket is correctly configured. Testcontainers with ryuk disabled works as expected but it would be nice if it would just work without requiring disabling it.
Relevant log output
No response
Additional information
I am using this project to trigger the issue in case you want to reproduce: https://github.com/dfioravanti/go-rest. Just run
go test ./...
in the root.The text was updated successfully, but these errors were encountered: