Skip to content

Instantly share code, notes, and snippets.

@rizky
Last active December 31, 2016 10:04
Show Gist options
  • Save rizky/f4e56132d5a30a18dc5f45643879909e to your computer and use it in GitHub Desktop.
Save rizky/f4e56132d5a30a18dc5f45643879909e to your computer and use it in GitHub Desktop.
Setup MSSQL Docker
#switch to docker-machine
eval "$(docker-machine env default)"
#run docker image
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD={{superstrong-password}}' -p 1433:1433 -d microsoft/mssql-server-linux
#create new docker-machine make sure docker-machine have 3.5GB of ram
#docker-machine create -d virtualbox --virtualbox-memory 4096 default
#edit default docker-machine make sure docker-machine have 3.5GB of ram
docker-machine stop
VBoxManage modifyvm default --memory 4096
docker-machine start
#check docker-machine's ip address
docker-machine ls
#set connection string. Make sure TrustServerCertificate=True
# "Server={{docker-machine-ip-address}},1433;Initial Catalog={{database-name}};Persist Security Info=False;User ID=sa;Password={{superstrong-password}};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment