Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1014 Bytes

File metadata and controls

37 lines (24 loc) · 1014 Bytes

Two steps example how to create and upgrade database in ms sql server linux container

To run scripts switch your docker to linux containers.

Step 1: create an image with sql server and SqlDatabaseDemo database version 1.0.

Database scripts are located in create-database-scripts folder.

Build image sqldatabase/mssql-server-linux-demo:create:

PS> .\create-database-build-image.ps1

Test image:

PS> docker run -it --rm -p 1433:1433 sqldatabase/mssql-server-linux-demo:create

Step 2: create an image with sql server and SqlDatabaseDemo database version 2.0.

During the build process we update SqlDatabaseDemo database from step 1 to version 2.0. Database scripts are located in upgrade-database-scripts folder.

Build image sqldatabase/mssql-server-linux-demo:upgrade:

PS> .\upgrade-database-build-image.ps1

Test image:

PS> docker run -it --rm -p 1433:1433 sqldatabase/mssql-server-linux-demo:upgrade