-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Makefile with instructions on how to start MS SQL server for testing
- Loading branch information
1 parent
941a463
commit 27e92ea
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
DB_FILES=/tmp/mssql_temp | ||
CONTAINER_NAME=mssql_test | ||
SA_PASSWORD=Passw0rd | ||
DB_NAME=test | ||
|
||
help: | ||
echo "use start or stop target" | ||
|
||
start: | ||
docker run --name=$(CONTAINER_NAME) -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=$(SA_PASSWORD)' -e 'MSSQL_PID=Developer' --cap-add SYS_PTRACE -v $(DB_FILES):/var/opt/mssql -d -p 1433:1433 microsoft/mssql-server-linux | ||
sleep 10 | ||
docker exec mssql_test /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '$(SA_PASSWORD)' -Q 'create database $(DB_NAME)' | ||
|
||
stop: | ||
docker stop $(CONTAINER_NAME) | ||
docker rm $(CONTAINER_NAME) |