Skip to content

Instantly share code, notes, and snippets.

@webmasterdevlin
Created March 17, 2020 17:22
Show Gist options
  • Save webmasterdevlin/24cb85d77c9efb5a302fe9cfdff44844 to your computer and use it in GitHub Desktop.
Save webmasterdevlin/24cb85d77c9efb5a302fe9cfdff44844 to your computer and use it in GitHub Desktop.
MS SQL Server Docker Compose
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