You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Url::from_str(DEFAULT_DOCKER_HOST).expect("default host is valid URL")
This has the effect of normalizing the Url into the following value (note the removed period from the beginning of .pipe):
npipe:////pipe/docker_engine
When bollard attempts to connect through that named pipe, it removes the npipe:// prefix, expecting to be left with just //.pipe/docker_engine, but due to this artifact, it is instead left with //pipe/docker_engine.
called `Result::unwrap()` on an `Err` value: Client(CreateContainer(HyperLegacyError { err: hyper_util::client::legacy::Error(Connect, Os { code: 53, kind: NotFound, message: "The network path was not found." }) }))
I confirmed this is a problem by forking this repo and hardcoding the value passed into the bollard client with the named path "npipe:////./pipe/docker_engine"
I think we can still parse into a Url to check the scheme for example, but we probably shouldn't use the parsed Url itself to pass on to clients. Consider that the bollard and hyper clients just take an &str anyway. If there's an error with the url formatting, it'll come out eventually.
Separately, It might be worthwhile adding a matrix to also run tests against Windows.
The text was updated successfully, but these errors were encountered:
On windows, the
DEFAULT_DOCKER_HOST
is correctly a named pipe path:testcontainers-rs/testcontainers/src/core/env/config.rs
Lines 32 to 34 in e354b75
However, as part of computing the
docker_host()
based on the configuration hierarchy, it is unconditionally parsed into aUrl
:testcontainers-rs/testcontainers/src/core/env/config.rs
Line 141 in e354b75
This has the effect of normalizing the Url into the following value (note the removed period from the beginning of
.pipe
):When bollard attempts to connect through that named pipe, it removes the
npipe://
prefix, expecting to be left with just//.pipe/docker_engine
, but due to this artifact, it is instead left with//pipe/docker_engine
.https://github.com/fussybeaver/bollard/blob/865805f87e4066dbf1a283139e1c6148b62ccd80/src/docker.rs#L838-L843
This results in:
I confirmed this is a problem by forking this repo and hardcoding the value passed into the bollard client with the named path
"npipe:////./pipe/docker_engine"
testcontainers-rs/testcontainers/src/core/client/bollard_client.rs
Lines 31 to 36 in e354b75
I think we can still parse into a Url to check the scheme for example, but we probably shouldn't use the parsed Url itself to pass on to clients. Consider that the bollard and hyper clients just take an
&str
anyway. If there's an error with the url formatting, it'll come out eventually.Separately, It might be worthwhile adding a matrix to also run tests against Windows.
The text was updated successfully, but these errors were encountered: