Closed JoseDevUFC closed 2 months ago
This is a regression in the recent VM image update (Ubuntu-22.04
) for GitHub-hosted runners and Microsoft-hosted agents: https://github.com/actions/runner-images/issues/10649. I am working on a PR right now - sorry for the inconvenience - MS 🤷. Please update the image to:
WithImage("mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04")
Is this still an issue? I've been seeing problems since I noticed Ubuntu 22.04.5 running in azure pipelines with testcontainers. 22.04.4 was/is working fine.
Seems like it is having trouble starting/verifying sql server
Host: unix:///var/run/docker.sock
Server Version: 26.1.3
Kernel Version: 6.8.0-1014-azure
API Version: 1.45
Operating System: Ubuntu 22.04.5 LTS
Total Memory: 6.77 GB
[testcontainers.org 00:00:00.18] Reuse is an experimental feature. For more information, visit: https://dotnet.testcontainers.org/api/resource_reuse/
[testcontainers.org 00:00:00.29] Reusable resource not found, create resource
[testcontainers.org 00:00:00.37] Searching Docker registry credential in Auths
[testcontainers.org 00:00:00.37] Searching Docker registry credential in CredHelpers
[testcontainers.org 00:00:00.37] Searching Docker registry credential in CredsStore
[testcontainers.org 00:00:00.37] Searching Docker registry credential in Auths
[testcontainers.org 00:00:00.37] Docker registry credential mcr.microsoft.com not found
[testcontainers.org 00:00:24.42] Docker image mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04 created
[testcontainers.org 00:00:24.52] Docker container 6abc7731610d created
[testcontainers.org 00:00:24.59] Start Docker container 6abc7731610d
[testcontainers.org 00:00:24.99] Wait for Docker container 6abc7731610d to complete readiness checks
[testcontainers.org 00:00:25.00] Execute "/bin/sh -c find /opt/mssql-tools*/bin/sqlcmd -type f -print -quit" at Docker container 6abc7731610d
[testcontainers.org 00:00:25.12] Execute "/opt/mssql-tools/bin/sqlcmd -C -Q SELECT 1;" at Docker container 6abc7731610d
[testcontainers.org 00:00:31.51] Execute "/opt/mssql-tools/bin/sqlcmd -C -Q SELECT 1;" at Docker container 6abc7731610d
...
Docker.DotNet.DockerApiException : Docker API responded with status code=Conflict, response={"message":"container 6abc7731610d56bcdb223721633a7a4aad11a245d7dc1cc008a1c409166b2e67 is not running"}
I confirmed this is still an issue. I just saw it was merged, wasn't sure if a release has been published or not. Anyhow, specifying WithImage("mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04")
resolved the issue for now.
Just a note...
WithImage("mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04") seemed to work most of my pipeline builds using Ubunutu 22.04.5. I did see at least one instance where the SQL server container was timing out on startup.
But it cleared up after stopping the pipeline and starting a new instance
Testcontainers version
3.10.0
Using the latest Testcontainers version?
Yes
Host OS
Ubuntu 22.04 OS Version: 22.04.5 LTS Kernel Version: 6.8.0-1014-azure Image Version: 20240915.1.0 Systemd version: 249.11-0ubuntu3.12
Host arch
x86
.NET version
8.0.401
Docker version
Docker info
What happened?
MsSqlContainer has started failing when running on Ubuntu 22.04.5 LTS before I was running on Ubuntu 22.04.4 LTS without any issues.
Relevant log output
Additional information
It fails when I call the MsSqlBuilder StartAsync() method:
` public TestcontainersTestDatabase() { _container = new MsSqlBuilder() .WithAutoRemove(true) .Build(); }