Skip to content

Commit 8f0a1ad

Browse files
authored
Add Microsoft SQL Server (#16)
1 parent 404a970 commit 8f0a1ad

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PostgreSQL | [./postgres](./postgres/) | <https://postgresql.org/>
1919
Redis | [./redis](./redis/) | <https://redis.io/>
2020
RedPanda | [./redpanda](./redpanda) | <https://vectorized.io/>
2121
ScyllaDB | [./scylla](./scylla) | <https://scylladb.com/>
22+
SQL Server | [./mssqlserver](./mssqlserver) | <https://www.microsoft.com/sql-server/>
2223
Tarantool | [./tarantool](./tarantool/) | <https://tarantool.io/>
2324
TiDB | [./tidb](./tidb/) | <https://pingcap.com/>
2425
YugaByteDB | [./yugabyte](./yugabyte) | <https://yugabyte.com/>

mssqlserver/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Microsoft SQL Server w/ Docker Compose
2+
3+
## Super User Authentication
4+
5+
Username: `sa`
6+
Password: `StrongPassw0rd!`
7+
8+
## Enter the Container w/ Bash
9+
10+
```docker-compose exec --user root db /bin/bash```
11+
12+
## Enter the sqlcmd Shell
13+
14+
```docker-compose exec --user root db /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'StrongPassw0rd!'```
15+
16+
## Create a DB
17+
18+
While inside the sqlcmd shell, run the following:
19+
20+
```sql
21+
CREATE DATABASE MyDatabase;
22+
GO
23+
```
24+
25+
## Other Docs
26+
27+
[Quickstart: Run SQL Server container images with Docker](https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker)

mssqlserver/docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3'
2+
3+
services:
4+
db:
5+
image: mcr.microsoft.com/mssql/server:latest
6+
user: root
7+
volumes:
8+
- mssql_data:/var/opt/mssql/data
9+
ports:
10+
- 1433:1433
11+
environment:
12+
- ACCEPT_EULA=Y
13+
- SA_PASSWORD=StrongPassw0rd!
14+
volumes:
15+
mssql_data:

0 commit comments

Comments
 (0)