Skip to content
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

Question about how ryuk works #171

Closed
Maniacal opened this issue Oct 11, 2024 · 2 comments
Closed

Question about how ryuk works #171

Maniacal opened this issue Oct 11, 2024 · 2 comments

Comments

@Maniacal
Copy link

I've been troubleshooting issues my team has been having with TC and I found a curious behavior of ryuk I can't explain and was wondering if you wouldn't mind. I know you keep these separate (I read through #161) but this behavior is ryuk specific.

When I run as specified it works:

± docker run -v /var/run/docker.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 docker.io/testcontainers/ryuk:0.8.1
2024/10/11 14:13:49 Pinging Docker...
2024/10/11 14:13:49 Docker daemon is available!
2024/10/11 14:13:49 Starting on port 8080...
2024/10/11 14:13:49 Started!
2024/10/11 14:14:49 Timeout waiting for connection
2024/10/11 14:14:49 Removed 0 container(s), 0 network(s), 0 volume(s) 0 image(s)

But I don't have anything at /var/run/docker.sock on my system:

± ls -lah /var/run/docker.sock
ls: /var/run/docker.sock: No such file or directory

I'm running rancher desktop so my docker.sock is elsewhere and I point things at it via DOCKER_HOST env var. If I point ryuk at my actual socket it doesn't work as you talked about in the issue I posted above.

So, If ryuk isn't running privileged, and I'm NOT mounting my docker.sock (I'm mounting the non-existent /var/run/docker.sock) how does ryuk connect to the docker daemon in that first, successful example?

@Maniacal
Copy link
Author

oh, nm. A coworker figured it out. It's because it's mounting the /var/run/docker.sock on the host container (since I'm on a mac).

Thx.

@kiview
Copy link
Member

kiview commented Oct 16, 2024

Even on Rancher Desktop, mounting /var/run/docker.sock should happen within the Linux VM, not on the Mac, so doing -v /var/run/docker.sock:/var/run/docker.sock should work (else it is an issue with Rancher Desktop not handling this special case correctly).

If you continue having issues, consider opening them in the specific Testcontainers project, since they are likely known and require Testcontainers specific config changes and are unrelated to Ryuk itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants