Created
March 17, 2020 17:22
-
-
Save webmasterdevlin/24cb85d77c9efb5a302fe9cfdff44844 to your computer and use it in GitHub Desktop.
MS SQL Server Docker Compose
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
version: "3.7" | |
services: | |
mssql: | |
image: "mcr.microsoft.com/mssql/server" | |
container_name: MS_SQL_Server | |
restart: always | |
environment: | |
SA_PASSWORD: "Pass123!" | |
ACCEPT_EULA: "Y" | |
volumes: | |
- mssql-data:/var/opt/mssql | |
ports: | |
# The default port of SQL Server is 1433. Let's also tell the container that the use its port 1433 to connect to port 1433 of sql server | |
- 1433:1433 | |
networks: | |
- dev | |
volumes: | |
mssql-data: | |
# actually this is the default | |
driver: local | |
networks: | |
dev: | |
# actually this is the default | |
driver: bridge | |
# Address in DatGrip jdbc:sqlserver://localhost\databasename:1433 | |
# "Data Source=localhost,1433;Initial Catalog=db;User id=sa;Password=Pass123!;MultipleActiveResultSets=True" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment