File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,20 @@ forceencryption = 1
109109 $ToolsPath = " /opt/mssql-tools"
110110 }
111111
112+ switch ($Version ) {
113+ " 2017" {
114+ $Tag = " CU31-GDR2-ubuntu-18.04"
115+ }
116+ " 2019" {
117+ $Tag = " CU28-ubuntu-20.04"
118+ }
119+ " 2022" {
120+ $Tag = " CU14-ubuntu-22.04"
121+ }
122+ }
123+
112124 Write-Output " Starting a Docker Container"
113- Invoke-Expression " docker run --name=`" sql`" -e `" ACCEPT_EULA=Y`" -e `" SA_PASSWORD=$SaPassword `" -e `" MSSQL_PID=Express`" --health-cmd=`" $ToolsPath /bin/sqlcmd -C -S localhost -U sa -P '$SaPassword ' -Q 'SELECT 1' -b -o /dev/null`" --health-start-period=`" 10s`" --health-retries=3 --health-interval=`" 10s`" -p 1433:1433 $AdditionalContainerConfiguration -d `" mcr.microsoft.com/mssql/server:$Version -latest `" "
125+ Invoke-Expression " docker run --name=`" sql`" -e `" ACCEPT_EULA=Y`" -e `" SA_PASSWORD=$SaPassword `" -e `" MSSQL_PID=Express`" --health-cmd=`" $ToolsPath /bin/sqlcmd -C -S localhost -U sa -P '$SaPassword ' -Q 'SELECT 1' -b -o /dev/null`" --health-start-period=`" 10s`" --health-retries=3 --health-interval=`" 10s`" -p 1433:1433 $AdditionalContainerConfiguration -d `" mcr.microsoft.com/mssql/server:$Version -$Tag `" "
114126 Wait-ForContainer
115127 }
116128
You can’t perform that action at this time.
0 commit comments