-
-
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
Allow DockerClientProviderStrategy to provide remote docker host uri #5039
Conversation
DockerClientProviderStrategy can provide different path to unix socket when docker runs on different host.
Hi @darl, thanks a lot for raising this PR and the interesting idea. Don't you think that the custom Docker host configuration capabilities in Testcontainers (which will be used by |
Since what you need can currently be achieved with |
I can use custom config to set up my local env.
My plan was to write custom
|
@darl have you considered tuning your colima setup so that it listens on the well known socket location inside the VM? |
It already listens on "well known" socket location inside VM ( |
Are there any details how testcontainers-cloud works (on client side)? |
then setting DOCKER_HOST/
No. It is a proprietary technology :) |
I don't understand how it works. |
Does this config work for you?
If you would set |
Yes. It works. I thought single Again. I can make it work "on my PC". I can write a comprehensive guide to "setup local PC/mac with docker". So, what do you think about this changes in library:
|
Thanks for your proposal @darl, I will go through each item separately.
This sounds like a good idea, it can be a distinct and small PR.
Docker Context is currently a Docker CLI feature and the format is not straightforward to work with. A clean integration would mean a call to Docker CLI and this is something we want to avoid.
As seen in the other issues such as #5034, there should be no need for a hack.
|
I still think it pretty useful, so I want implement it internally.
I see only Its true that with Btw, I found workaround for this issue by explicitly providing DockerClient with different TransportConfig: I found it pretty hacky, but I can live with it. |
I've been trying to set up Testcontainers to use my SSH docker endpoint to no avail. Using the Any help would be greatly appreciated! Thanks! |
After testcontainers-cloud announcement, I prototyped support for
docker over ssh
:https://gist.github.com/darl/7215ec147558d371d9c34430fde2add9
The ugly part is unix socket path mapping.
ryuk
uses local dockerHost path, but it runs on a remote machine, where it's not accessible.With this change, DockerClientProviderStrategy can provide different path to unix socket when needed.