devenv: Upgrade MSSQL Docker image (#28749)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen 2020-11-03 09:45:21 +01:00 committed by GitHub
parent cfbbab9bd8
commit 45f311874d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,12 @@
FROM mcr.microsoft.com/mssql/server:2017-CU4-ubuntu
FROM mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-18.04
WORKDIR /usr/setup
COPY . /usr/setup
RUN chmod +x /usr/setup/setup.sh
CMD /bin/bash ./entrypoint.sh
COPY setup.sh setup.sql.template entrypoint.sh ./
USER root
RUN chmod +x setup.sh
RUN chown -R mssql ./
USER mssql
CMD /bin/bash ./entrypoint.sh

View File

@ -1,4 +1,5 @@
#/bin/bash
set -eo pipefail
#wait for the SQL Server to come up
sleep 15s
@ -9,4 +10,4 @@ cat /usr/setup/setup.sql.template | awk '{
gsub(/%%PWD%%/,"'$MSSQL_PASSWORD'")
}1' > /usr/setup/setup.sql
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /usr/setup/setup.sql
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i /usr/setup/setup.sql