testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.65k stars 250 forks source link

[Enhancement]: Improve ASP NET example with SQL Server using Rosetta #1204

Open mmalvik opened 1 week ago

mmalvik commented 1 week ago

Problem

The docs say:

https://github.com/testcontainers/testcontainers-dotnet/blob/a0f1f7694b4602aa2ba7da6f167ddc4a56670ecc/docs/examples/aspnet.md?plain=1#L84

I think it would be smart to point out the SQL Server image can run fine on ARM Mac using Rosetta. At least in using Docker desktop this works fine:

image

SQL Edge also has some downsides:

However, using Azure SQL Edge does have some drawbacks. First, you cannot develop against a specific SQL Server 2017/2019/2022 version with Azure SQL Edge. Second, SQL Edge’s unsupported features impose a limit on some scenarios, including: In-Memory OLTP, CLR, and CLR based data types.

Source: https://techcommunity.microsoft.com/t5/sql-server-blog/azure-sql-edge-update-september-2023/ba-p/3930827

Solution

Improve the example with info on how to run the SQL Server.

Another alternative is to remove those details from the example and move it to https://dotnet.testcontainers.org/modules/mssql/

Benefit

Improved documentation.

Alternatives

Leave the docs as is.

Would you like to help contributing this enhancement?

Yes

HofmeisterAn commented 1 week ago

Thanks for sharing the issue/enhancement. I totally forgot about the documentation. I replaced Azure SQL Edge with PostgreSQL some time ago (https://github.com/testcontainers/testcontainers-dotnet/pull/1156) after Microsoft announced they would no longer continue developing or supporting it.

I suggest changing the documentation to indicate that the referenced example uses PostgreSQL. Then, add the information about Rosetta to the MSSQL module documentation. WDYT?

mmalvik commented 1 week ago

That sounds good to me 👍

I can look into a PR for this soon