Skip to content

Commit

Permalink
Simplify usage with docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Hagith committed Oct 14, 2019
1 parent d1fd81b commit 5d87e31
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
COMPOSE_PROJECT_NAME=

ACCEPT_EULA=Y
SA_PASSWORD=Strong(!)Password
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.project
.idea
ignore
initdb.d/*
!.gitkeep
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3"

services:
server:
build: .
image: genschsa/mssql-server-linux
container_name: mssql
ports:
- "1433:1433"
environment:
- SA_PASSWORD
- ACCEPT_EULA
volumes:
- ./initdb.d:/docker-entrypoint-initdb.d
Empty file added initdb.d/.gitkeep
Empty file.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"description": "Clone of microsoft/mssql-server-linux image with initdb functionality.",
"main": "index.js",
"scripts": {
"start": "docker run -p 1433:1433 --name mssql -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Strong(!)Password' -v $PWD/initdb.d:/docker-entrypoint-initdb.d -d genschsa/mssql-server-linux",
"stop": "docker stop mssql && docker rm mssql",
"build": "docker build -t genschsa/mssql-server-linux .",
"sqlcmd": "docker exec -it mssql sqlcmd -U SA -P 'Strong(!)Password'",
"start": "docker-compose up -d",
"stop": "docker-compose stop",
"down": "docker-compose down",
"build": "docker-compose build",
"sqlcmd": "docker-compose exec server sqlcmd -U sa",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down

0 comments on commit 5d87e31

Please sign in to comment.