File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,20 @@ forceencryption = 1
109
109
$ToolsPath = " /opt/mssql-tools"
110
110
}
111
111
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
+
112
124
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 `" "
114
126
Wait-ForContainer
115
127
}
116
128
You can’t perform that action at this time.
0 commit comments