Skip to content

Commit

Permalink
Add Microsoft SQL Server (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjschave authored Sep 10, 2021
1 parent 404a970 commit 8f0a1ad
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PostgreSQL | [./postgres](./postgres/) | <https://postgresql.org/>
Redis | [./redis](./redis/) | <https://redis.io/>
RedPanda | [./redpanda](./redpanda) | <https://vectorized.io/>
ScyllaDB | [./scylla](./scylla) | <https://scylladb.com/>
SQL Server | [./mssqlserver](./mssqlserver) | <https://www.microsoft.com/sql-server/>
Tarantool | [./tarantool](./tarantool/) | <https://tarantool.io/>
TiDB | [./tidb](./tidb/) | <https://pingcap.com/>
YugaByteDB | [./yugabyte](./yugabyte) | <https://yugabyte.com/>
Expand Down
27 changes: 27 additions & 0 deletions mssqlserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Microsoft SQL Server w/ Docker Compose

## Super User Authentication

Username: `sa`
Password: `StrongPassw0rd!`

## Enter the Container w/ Bash

```docker-compose exec --user root db /bin/bash```

## Enter the sqlcmd Shell

```docker-compose exec --user root db /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'StrongPassw0rd!'```

## Create a DB

While inside the sqlcmd shell, run the following:

```sql
CREATE DATABASE MyDatabase;
GO
```

## Other Docs

[Quickstart: Run SQL Server container images with Docker](https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker)
15 changes: 15 additions & 0 deletions mssqlserver/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'

services:
db:
image: mcr.microsoft.com/mssql/server:latest
user: root
volumes:
- mssql_data:/var/opt/mssql/data
ports:
- 1433:1433
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=StrongPassw0rd!
volumes:
mssql_data:

0 comments on commit 8f0a1ad

Please sign in to comment.