WithReuse(true) + Docker 4.42.1 causes StartAsync() to hang when container is already running #1472
-
Hi! I've had some issues with Testcontainers with the latest version of Docker Desktop (4.42.1). Docker version: 4.42.1, WSL2 backend Code: var container = new MsSqlBuilder()
.WithImage("mcr.microsoft.com/mssql/server:2022-latest")
.WithReuse(true)
.Build();
await container.StartAsync(); // This is the part that is timing out when the container is already started. I've tried using Things that makes it work again:
I also noticed a similar here #1466 with timeout issue, but I'm not sure if this is related. Any idea on why this is happening? I wanted to wait with creating an issue in case I'm misunderstanding something. Exception:
Logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is probably related to the following PR (#1465) and appears to be a bug/regression in Docker Desktop. The PR includes an explanation. There are quite a few issues with Docker Desktop version 4.42.0 and later. I've forwarded the details to the Docker team. They are aware of the issues, and I hope they will address them soon. BTW the issue also occurs when using the CLI:
☝️ starting it twice breaks the port bindings/mappings. |
Beta Was this translation helpful? Give feedback.
-
I just wanted to hop in and say that you're not alone, I ended up downgrading both WSL and Docker Desktop as a workaround to fix what used to work fine. |
Beta Was this translation helpful? Give feedback.
This is probably related to the following PR (#1465) and appears to be a bug/regression in Docker Desktop. The PR includes an explanation.
There are quite a few issues with Docker Desktop version 4.42.0 and later. I've forwarded the details to the Docker team. They are aware of the issues, and I hope they will address them soon.
BTW the issue also occurs when using the CLI:
☝️ starting it twice breaks the port bindings/mappings.