Closed Evyatar108 closed 5 months ago
This sounds very unusual. The HTTP request should get its response fairly quickly. I would expect something else is causing an issue. A few seconds is already a lot. I haven't seen something like this before. Although, it looks like you are depending on Windows containers (on purpose?), which I haven't used for a while now. Have you tried the Linux engine? Do you run into similar issues?
To override the default Docker client configuration, you can pass a custom Docker endpoint configuration to the builder (you can use the custom Docker endpoint as a global configuration too without assigning it to every builder configuration). Here is a quick example:
_ = new ContainerBuilder()
.WithDockerEndpoint(new MyCustomDockerEndpoint())
.Build();
private sealed class MyCustomDockerEndpoint : IDockerEndpointAuthenticationConfiguration
{
public Uri Endpoint => TestcontainersSettings.OS.DockerEndpointAuthConfig.Endpoint;
public Credentials Credentials => TestcontainersSettings.OS.DockerEndpointAuthConfig.Credentials;
public DockerClientConfiguration GetDockerClientConfiguration(Guid sessionId = default)
{
return new DockerClientConfiguration(Endpoint, Credentials, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5), ReadOnlyDictionary<string, string>.Empty);
}
}
I will close this issue due to inactivity. If you still have any issues or further questions, please do not hesitate to reopen it again.
Testcontainers version
3.5.0
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host arch
x64
.NET version
6
Docker version
Docker info
What happened?
I sometime reach the timeout of 100 seconds when trying to start a new container, I checked the code and couldn't find a straightforward way to modify the timeout
Relevant log output
Additional information
I use this code to build the container:
for now to bypass this issue I modify the timeout with a bit of reflection:
and then I run