Closed terryaney closed 4 months ago
Could you please share the actual container logs? The logs contain the reasons why the container suddenly exited.
It looks like your Docker VM only provides 2GB of RAM. According to the docs this might not be enough.
Great eye. This fixed it, thanks a lot. In case I ever have problems in the future, where are these:
Could you please share the actual container logs? The logs contain the reasons why the container suddenly exited.
In case I ever have problems in the future, where are these:
Either use the Docker CLI command docker container logs or access them by selecting the container in Docker Desktop and opening Logs in the top menu bar.
Since the issue seems to be resolved, I will close it in the meantime. If you have further questions, do not hesitate to reopen it again.
Testcontainers version
3.6.0
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host arch
x86
.NET version
7
Docker version
Docker info
What happened?
I develop on a laptop and desktop using the same repository, but Testcontainers.MsSql has a fail rate of about 95% on the desktop, while a 100% success rate on the laptop. The error I get on my desktop for all my tests is:
Docker.DotNet.DockerApiException : Docker API responded with status code=Conflict, response={"message":"container 181ed4bbfa292f8cbf9a6f17cf7abada437af1ea37eb9f810150c18c83ded3d1 is not running"}
However, while I watch Docker Desktop, I can see images/containers starting up and stopping in what seems like a normal fashion. I have Docker Desktop 4.27.2 on my desktop and 4.27.1 on my laptop.
I've seen other issues asking for enabling logs but I haven't discovered how to enable them yet. My code in a derived
WebApplicationFactory<T>
is simply:Any ideas of why the Desktop mostly doesn't work? Let me know if there is more information I can provide. (FYI, posted similar question on Stackoverflow and got close votes, not sure why, hoping it is because they want it here).
Relevant log output
No response
Additional information
No response