Closed tamaroning closed 5 months ago
Hi @tamaroning 👋
For Windows
the default socket is npipe:////./pipe/docker_engine
. But that's should be overridden, since you use WSL.
You can try to set DOCKER_HOST=tcp://localhost:2375
. Don't really remember defaults for Windows+WSL setup, but if this doesn't help, you will need expose the docker through TCP socket manually.
We definitely need to improve the documentation to cover this topic better.
Please, let me know if it solves your issue.
For anyone else driving by, the same is necessary on MacOS with Colima (and presumably any non-Docker container VM). I used export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
. I don't recall having to do this for older versions of testcontainers-rs, but it's not a big deal to throw this in ~/.zshrc
.
I don't recall having to do this for older versions of testcontainers-rs, but it's not a big deal to throw this in ~/.zshrc
Yes, that's because we got rid of CLI client, which was more like a temporary solution from the very beginning (with its pros and cons)
Just in order to extend the context:
Now we utilize Docker compatible API, and docker host resolution was described in migration guide for 16.0.0 version and also mentioned in docs.rs (as well as docker authentication process)
Not exhaustive list of benefits:
And the main cost for that is the additional configuration only in some cases.
Reference to a similar issue: https://github.com/testcontainers/testcontainers-rs/issues/625
I'm going to close the issue due to inactivity. Please, don't hesitate to re-open if you feel the provided information is insufficient.
Hello, I got this error when attempting to start a container on Windows.
Error:
I have installed Docker Desktop on Windows and Docker on WSL2.
~/.testcontainers.properties
orDOCKER_HOST
were not set.I have read the docs but could not find what values I should set. How can I fix the error? Thank you in advance.