Skip to content

[Bug]: Build container failed when Docker is in the Resource Saver Mode #1562

@spukhanov

Description

@spukhanov

Testcontainers version

4.8.1

Using the latest Testcontainers version?

Yes

Host OS

Windows

Host arch

x64

.NET version

8.0

Docker version

Client:
 Version:           28.3.2
 API version:       1.51
Server: Docker Desktop 4.44.3 (202357)
 Engine:
  Version:          28.3.2
  API version:      1.51 (minimum version 1.24)

Docker info

Client:
 Version:    28.3.2

What happened?

Build container failed when Docker in the Resource Saver Mode. The call to IsAvailable -> dockerClient.System.PingAsync throws an exception. Need to wrap dockerClient.System.PingAsync with a retry behavior (like 5 x 3 sec ?). The first ping is failed but it wakes up the engine, so the next ping should be OK.
I tried to wrap .Build with a retry behavior, but it doesn't work because DockerEndpointAuthProvider is static and IsAvailable called only once.
Expected result: Can build and run a container when Docker in the Resource Saver Mode.

Relevant log output

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions