🚀 Objective

By the end of this tutorial, you’ll have Microsoft SQL Server up and running on your Apple Silicon-powered Mac using Docker. And as a bonus, I’ll show you how to connect it using a sleek SQL client UI for a better experience.

🔧 Requirements

Before we begin, make sure you have the following:

  • Docker Engine v1.8+
  • At least 1GB of allocated RAM (you can adjust Docker’s memory allocation via Docker Desktop preferences)

⚠️ Apple Silicon support has improved significantly in recent Docker versions. Make sure you’re using the latest Docker Desktop release compatible with ARM64-based Macs.

🐳 Pull & Run SQL Server in Docker

Once everything’s set up, it’s time to launch SQL Server inside a Docker container.

Open your terminal and run:

docker run -e "ACCEPT_EULA=1" \
-e "MSSQL_SA_PASSWORD=MyPass@word" \
-e "MSSQL_PID=Developer" \
-p 1433:1433 \
-d --name=sql \
mcr.microsoft.com/azure-sql-edge

✅ This version of SQL Server is optimized for edge devices and compatible with ARM architecture – perfect for Mac M1/M2/M3 users.

🔍 What these flags mean:

  • ACCEPT_EULA=1: Required to accept Microsoft’s license agreement.
  • MSSQL_SA_PASSWORD: Sets the password for the default system admin (user: sa). Remember, your password must be strong — include uppercase, lowercase, numbers, and a special character.
  • MSSQL_PID=Developer: This tells the container to use the Developer edition.
  • -p 1433:1433: Maps the default SQL port to your local machine.
  • --name=sql: Gives the container a recognizable name.
  • mcr.microsoft.com/azure-sql-edge: The Docker image that supports ARM.

🧠 Pro Tip: Use Azure Data Studio for GUI Access

Prefer a visual tool over the command line? Download Azure Data Studio, a free and cross-platform database client. Here’s how to connect:

  1. Launch Azure Data Studio
  2. Click on “New Connection”
  3. Use the following details:
    • Server: 127.0.0.1
    • Authentication type: SQL Login
    • Username: sa
    • Password: MyPass@word

Once connected, you’ll have full access to the SQL environment running in your container.

🗃️ Create Your Own Database

Avoid working in the default master database — let’s spin up your own:

Paste this SQL into a new query tab in Azure Data Studio and hit Run:

USE master;
GO
IF NOT EXISTS (
    SELECT name FROM sys.databases WHERE name = N'TestDb'
)
CREATE DATABASE TestDb;
GO

Congratulations 🎉 — you’ve just created a new SQL database on your Mac using Docker!

🎁 Bonus: Why Use Azure SQL Edge?

If you’re wondering why we used Azure SQL Edge, here’s why:

  • It supports ARM64 architecture natively
  • Lightweight and optimized for edge use cases
  • Fully compatible with standard SQL Server tools and commands

✅ Wrapping Up

Running Microsoft SQL Server on an M1/M2/M3 Mac has never been easier, thanks to Docker and Azure SQL Edge. Now you have a flexible, developer-friendly SQL environment — all set up locally. Connect using Azure Data Studio or your favorite SQL client, and you’re good to go!