GeezerVison is showing microsoft.github.io — Azure SQL Database container
Private Preview
The Azure SQL Database engine, running locally.
Build and test against the same engine you run in the Microsoft Azure cloud. Try Azure SQL Database before you deploy, and run your tests in CI. Free for local development. No Azure subscription, no credit card.
< 1 minFrom docker pull to your first query
FreeFor local development and CI. No subscription, no credit card.
Same engineIdentical to Azure SQL Database in the cloud
Works with the drivers, ORMs, and editors you already use
Why the container
Cloud parity, in your local environment.#
This is the Azure SQL Database engine itself, running locally, for development. Build in your local inner loop, then deploy the same code to Azure SQL Database in the Microsoft Azure cloud for production.
Same engine
What runs locally runs in Azure
It is the Azure SQL Database engine itself, with the same defaults, the same T-SQL, and the same error messages. When you deploy to the Microsoft Azure cloud, there are no behavior surprises.
AI-ready
AI-ready, like Azure SQL Database
Native vector type, VECTOR_DISTANCE search, AI_GENERATE_EMBEDDINGS, CREATE EXTERNAL MODEL, and DiskANN vector indexes with CREATE VECTOR INDEX. Build RAG locally with a local model, then switch to Azure OpenAI in the cloud.
Lift and shift
One codebase, two endpoints
Same drivers, same T-SQL, same migrations. When you are ready, point the connection at Azure SQL Database and deploy the same app to the Microsoft Azure cloud. The application does not change.
Inner loop to the cloud
Same code. Only the connection string changes.
Write your app once against the container. Ship it to Azure SQL Database in the cloud without touching the code.
Local environment
.env
SQL_CONNECTION_STRING=
Server=localhost,1433;
Database=appdb;
User Id=sa;TrustServerCertificate=true
In Azure
.env
SQL_CONNECTION_STRING=
Server=app.database.windows.net;
Database=appdb;
Authentication=Active Directory Default
app.js
identical in both
import sql from 'mssql'
// reads the connection string from the environment
const pool = await sql.connect(process.env.SQL_CONNECTION_STRING)
const { recordset } = await pool.query`
SELECT TOP 5 name,
VECTOR_DISTANCE('cosine', embedding, @q) AS score
FROM products ORDER BY score`
Two connection strings, side by side. The highlighted server is all that changes. Your app.js is identical in both.
Quickstart
Up and running in three commands.#
New to containers? Sign up for the Private Preview to get your registry credentials, then sign in, start the container, and run your first query. The credentials are pull-only and may be rotated during the preview.
0
Sign up for the Private Preview
Signing up is how you get the registry username and password. Sign up →
1
Sign in to the preview registry
Use the username and password you received when you signed up.
$ docker login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io -u <username>
$ podman login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io -u <username>
$ nerdctl login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io -u <username>
$ wslc login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io -u <username>
2
Start the container
Run it on port 1433 with a strong SA password. The runtime selects the matching image architecture automatically (see Getting started).
$ MSSQL_SA_PASSWORD="Aa1%$(openssl rand -hex 16)"
$ docker run --name sqldb -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$MSSQL_SA_PASSWORD" \
-p 127.0.0.1:1433:1433 -d sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest
$ MSSQL_SA_PASSWORD="Aa1%$(openssl rand -hex 16)"
$ podman run --name sqldb -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$MSSQL_SA_PASSWORD" \
-p 127.0.0.1:1433:1433 -d sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest
$ MSSQL_SA_PASSWORD="Aa1%$(openssl rand -hex 16)"
$ nerdctl run --name sqldb -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$MSSQL_SA_PASSWORD" \
-p 127.0.0.1:1433:1433 -d sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest
$ MSSQL_SA_PASSWORD="Aa1%$(openssl rand -hex 16)"
$ wslc run --name sqldb -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$MSSQL_SA_PASSWORD" \
-p 127.0.0.1:1433:1433 -d sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest
3
Connect and query
No host install needed: the container bundles sqlcmd. Run your first query with exec.
$ docker exec sqldb /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P "$MSSQL_SA_PASSWORD" -C -Q "SELECT @@VERSION;"
$ podman exec sqldb /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P "$MSSQL_SA_PASSWORD" -C -Q "SELECT @@VERSION;"
$ nerdctl exec sqldb /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P "$MSSQL_SA_PASSWORD" -C -Q "SELECT @@VERSION;"
$ wslc exec sqldb /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P "$MSSQL_SA_PASSWORD" -C -Q "SELECT @@VERSION;"
Want your AI agent to set it up, or prefer the full step-by-step? Read the full Get started guide →
Built for AI-assisted development
Bring your AI coding agent.#
Point your agent at the container and let it scaffold the schema, write the migrations, and build the data layer against a real local database. The repo ships 17 ready-to-use agent skills.
Install the agent skills once. They work across Claude Code, GitHub Copilot, Codex, and Cursor, then you just ask your agent in plain English.
Each skill carries layered knowledge and can optionally reach the public Microsoft Learn MCP for the current docs and schemas on demand.
$ npx skills add microsoft/azure-sql-database-container
See all 17 skills and per-tool install →
Use cases
What can you build with it?#
The everyday jobs a cloud-only database makes slow or expensive. Pick one, copy the prompt, and let your AI agent build it against the container.
from sql server
Already using the SQL Server image?
Convert a project on the mcr.microsoft.com/mssql/server SQL Server image to the Azure SQL Database engine: swap the image, fix the connection model, and flag SQL Server-only features. Azure-faithful local dev.
local → cloud
Build locally, ship to Azure
Develop and test at local-disk speed with no cloud round trip, then deploy the same code to Azure SQL Database. Lift and shift is a connection-string change.
ai / rag
Prototype AI and RAG apps
Build vector search and embeddings against a local database with a local model like Ollama, then switch to Azure OpenAI in the cloud. No cloud spend while you experiment.
ci
Run integration tests in CI
Spin the container up as a service in GitHub Actions or Azure Pipelines. Real end-to-end tests, with no Azure subscription and no shared-instance flakiness.
offline
Develop offline
Run demos, classes, and workshops with no internet. After the first pull, the container runs fully offline on a laptop.
compose
Drop in as a sidecar
Add SQL Database to a docker compose stack or a Dev Container as a sidecar service, wire-compatible with the drivers and ORMs you already use.
templates
Scaffold new projects
Start a new .NET Aspire, FastAPI, Next.js, or NestJS project with Azure SQL Database as the default local development resource.
rest / graphql
Instant API over your tables
Generate a no-code REST and GraphQL API over the local engine with Data API Builder. Point it at your tables, and get an MCP endpoint from the same config too.
serverless
Serverless and event-driven
Build an Azure Functions HTTP API with the Azure SQL bindings, and react to row changes locally with the SQL trigger (Change Tracking). No cloud services required.
Get involved
You shape this preview.#
Your bugs and feature requests set the priorities. Reach the team directly, or pick the channel that fits your question.
|