Skip to content

Instantly share code, notes, and snippets.

@JupyterJones
Last active April 20, 2022 06:14
Show Gist options
  • Save JupyterJones/4d5d8ae9a41ea4b8b8b3370dda7e06d2 to your computer and use it in GitHub Desktop.
Save JupyterJones/4d5d8ae9a41ea4b8b8b3370dda7e06d2 to your computer and use it in GitHub Desktop.
Start an SQL server
sudo docker pull microsoft/mssql-server-linux:2017-latest &&
docker run \
-e 'ACCEPT_EULA=Y' \
-e 'MSSQL_SA_PASSWORD=YourSTRONG!Passw0rd' \
-p 1401:1433 \
-n sql1 \
-d microsoft/mssql-server-linux:2017-latest
private static string _connStr = @"
Server=127.0.0.1,1401;
Database=Master;
User Id=SA;
Password=YourSTRONG!Passw0rd";
#ref: https://stackoverflow.com/questions/45712122/connection-string-for-sqlserver-in-docker-container
@JupyterJones
Copy link
Author

Muli-line command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment