Lightweight Microsoft SQL Server 2019 container for fast local database setup.
67
A lightweight, pre-configured Microsoft SQL Server 2019 container image designed for development, testing, and CI/CD environments.
Run a standalone container instance using docker run:
docker run -d \
--name mssql2019 \
-p 1433:1433 \
-e "ACCEPT_EULA=Y" \
-e "MSSQL_SA_PASSWORD=YourStrong@Password123" \
-v mssql_data:/var/opt/mssql \
--restart unless-stopped \
teeravitdev/ms-sqlserver-2019:2019-latest
For multi-container applications or local persistence, define your service in docker-compose.yml:
version: '3.8'
services:
mssql:
image: teeravitdev/ms-sqlserver-2019:2019-latest
container_name: mssql2019
restart: unless-stopped
ports:
- "1433:1433"
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=YourStrong@Password123
volumes:
- mssql_data:/var/opt/mssql
volumes:
mssql_data:
Start the container in the background:
docker compose up -d
| Variable | Required | Description | Default |
|---|---|---|---|
ACCEPT_EULA | Yes | Confirms your acceptance of the End-User Licensing Agreement. Set to Y. | — |
MSSQL_SA_PASSWORD | Yes | Sets the system administrator (sa) password. | — |
MSSQL_PID | Optional | Product edition to run (e.g., Developer, Express, Standard). | Developer |
Connect using database management tools like SSMS (SQL Server Management Studio), Azure Data Studio, or DBeaver:
localhost,1433 (or 127.0.0.1,1433)sa<MSSQL_SA_PASSWORD>MSSQL_SA_PASSWORD contains at least 8 characters with upper/lowercase letters, digits, and special symbols./var/opt/mssql so your databases and log files persist across container restarts or removals.1433 directly to public networks in production environments without firewall or VPN protection.Content type
Image
Digest
sha256:e7ef04aca…
Size
505.1 MB
Last updated
9 months ago
docker pull teeravitdev/ms-sqlserver-2019:2019-latest