diff --git a/README.md b/README.md index 8e3f94c..d2f8897 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ PostgreSQL | [./postgres](./postgres/) | Redis | [./redis](./redis/) | RedPanda | [./redpanda](./redpanda) | ScyllaDB | [./scylla](./scylla) | +SQL Server | [./mssqlserver](./mssqlserver) | Tarantool | [./tarantool](./tarantool/) | TiDB | [./tidb](./tidb/) | YugaByteDB | [./yugabyte](./yugabyte) | diff --git a/mssqlserver/README.md b/mssqlserver/README.md new file mode 100644 index 0000000..0253ef7 --- /dev/null +++ b/mssqlserver/README.md @@ -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) \ No newline at end of file diff --git a/mssqlserver/docker-compose.yml b/mssqlserver/docker-compose.yml new file mode 100644 index 0000000..521bdf2 --- /dev/null +++ b/mssqlserver/docker-compose.yml @@ -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: \ No newline at end of file