-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 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
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,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) |
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,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: |