Deffiss / testenvironment-docker

MIT License
117 stars 30 forks source link

feat: use mcr.microsoft.com/azure-sql-edge image for mssql #72

Closed ZaoralJ closed 1 year ago

ZaoralJ commented 1 year ago

use mcr.microsoft.com/azure-sql-edge image for Mssql. There is issue to run mcr.microsoft.com/mssql/server on arm64

Deffiss commented 1 year ago

Hi, @ZaoralJ I don't believe this is reasonable to change the default image here. Seems Azure SQL Edge is not exactly the same as just usual MSSQL Server. However, for your project needs you can easily use required image, just by specifying ImageName in params:

                .AddMssqlContainer(p => p with
                {
                    ImageName = "mcr.microsoft.com/azure-sql-edge",
                    Name = "my-mssql",
ZaoralJ commented 1 year ago

Hi, @ZaoralJ I don't believe this is reasonable to change the default image here. Seems Azure SQL Edge is not exactly the same as just usual MSSQL Server. However, for your project needs you can easily use required image, just by specifying ImageName in params:

                .AddMssqlContainer(p => p with
                {
                    ImageName = "mcr.microsoft.com/azure-sql-edge",
                    Name = "my-mssql",

Hi @Deffiss, that was the first think I've tried. There is problem with forced env ["MSSQL_PID"] = "Express", valid value for azure sql edge is Developer or Premium. Developer PID is default for SQL server. What about remove ["MSSQL_PID"] = "Express" or new nuget for AzureSqlEdge?

Deffiss commented 1 year ago

Let me check the code, probably you can just override.

Deffiss commented 1 year ago

Right, I got the problem. It is not possible to override with the way how it is implemented right now. Let me think how to achieve it in an easiest way.

Deffiss commented 1 year ago

Ok how about adding Azure SQL Edge specific extension method? It will be something like .AzureSqlEdgeContainer(). You can use a basic version of AddMssqlContainer but adjust the logic to use appropriate base image and specify proper MSSQL_PID

Deffiss commented 1 year ago

Or, I can fix the logic for AddMssqlContainer and do not override MSSQL_PID parameter if it is provided. What will work better for you?

ZaoralJ commented 1 year ago

Ok how about adding Azure SQL Edge specific extension method? It will be something like .AzureSqlEdgeContainer(). You can use a basic version of AddMssqlContainer but adjust the logic to use appropriate base image and specify proper MSSQL_PID

I can make PR for new AzureSqlEdgeContainer. It might be handy.

ZaoralJ commented 1 year ago

Open #73 to support AzureSqlEdge