Skip to content

Commit

Permalink
Merge pull request microsoft#19 from microsoft/bobworking
Browse files Browse the repository at this point in the history
Updated readme and files for sqlcontainers demos
  • Loading branch information
rgward authored May 6, 2020
2 parents 95074a8 + ffec2c8 commit 826938d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 2 additions & 2 deletions demos/sqlbyexample/sqlcontainers/cleanup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ docker stop sql2019ga
docker stop sql2019ga2
docker rm sql2019ga
docker rm sql2019ga2
docker stop sql2019cu1
docker rm sql2019cu1
docker stop sql2019cu4
docker rm sql2019cu4
docker volume rm sql2019volume sql2019volume2

23 changes: 23 additions & 0 deletions demos/sqlbyexample/sqlcontainers/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SQL Server Containers

In this example, you will learn how to deploy a SQL Server container.

## Requirements

All the examples use Docker Desktop which you can install at https://www.docker.com/products/docker-desktop. These examples require an internet connection as images will be pulled to your machine. If you prefer to run these examples on Linux with the bash shell see the SQL Server 2019 workshop at https://aka.ms/sql2019workshop.

You will also need to download the WideWorldImporters sample backup (which you can download from https://github.com/Microsoft/sql-server-samples/releases/download/wide-world-importers-v1.0/WideWorldImporters-Full.bak) and copy it into the c:\sql_sample_databases directory or modify step2_copyintocontainer.ps1 to put in the proper path for the backup.

## Steps

Run each script in "step" order (Example. step1_.., step2_...). To start over, run the cleanup.ps1 script.

To see a complete tutorial of how to run these scripts look Module 06 of the SQL Server 2019 Workshop at https://aka.ms/sql2019workshop.

## Notes

To get a complete list of SQL Server containers for Ubuntu use the Docker Hub page at https://hub.docker.com/_/microsoft-mssql-server. A complete list of SQL Server containers for RHEL can be found at https://catalog.redhat.com/software/containers/explore.

Tip: To "hack" into the Docker Desktop Virtual Machine on Windows, run a container like the following:

`docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh`
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
docker stop sql2019cu1
docker stop sql2019cu4
docker start sql2019ga
6 changes: 3 additions & 3 deletions demos/sqlbyexample/sqlcontainers/step5_patchsql.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ docker run `
-e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Sql2019isfast' `
-p 1401:1433 `
-v sql2019volume:/var/opt/mssql `
--hostname sql2019cu1 `
--name sql2019cu1 `
--hostname sql2019cu4 `
--name sql2019cu4 `
-d `
mcr.microsoft.com/mssql/server:2019-CU1-ubuntu-16.04
mcr.microsoft.com/mssql/server:2019-CU4-ubuntu-16.04

0 comments on commit 826938d

Please sign in to comment.