Install Microsoft SQL Server on Mac M2 Air using Docker and Azure Data Studio

Table of Contents
This guide walks you through setting up Microsoft SQL Server on Apple Silicon (Mac M2 Air) using Docker containers, connecting via Azure Data Studio, and restoring the AdventureWorks sample database.
Prerequisites
Install the following tools on your Mac:
- Docker Desktop for Mac
- Azure Data Studio for Mac
Check Docker Settings (Apple Silicon)
Before launching the container, verify that Docker Desktop is properly configured for x86 emulation on Apple Silicon:
- Open Docker Desktop → Settings → General tab.
- Ensure “Use the Apple Virtualization framework” is checked.
- Enable “Use Rosetta for x86_64/amd64 emulation on Apple Silicon” to run amd64 container images smoothly.

Setting Up the SQL Server Container
Run the official Microsoft SQL Server Linux image using linux/amd64 emulation:
docker run --platform linux/amd64 \
-e "ACCEPT_EULA=Y" \
-e 'MSSQL_SA_PASSWORD=StrongPa55w0rd!' \
-p 1433:1433 \
--name sqlserver \
-d mcr.microsoft.com/mssql/server:2022-latest
Connecting with Azure Data Studio
Launch Azure Data Studio and create a new connection:
- Connection type: Microsoft SQL Server
- Server:
localhost,1433 - Authentication type: SQL Login
- User name:
sa - Password:
StrongPa55w0rd!

Setting Up Sample Database
Download the AdventureWorks sample database backup.
Open Docker Desktop, select your sqlserver container, navigate to the Files tab, and upload AdventureWorks2016.bak into the /var/opt/mssql/ directory:

Database Restoration
1. Enable Preview Features
In Azure Data Studio, open Settings and search for “unreleased preview features” to enable database restore tools:

2. Restore Database from Backup
In the Connections sidebar, right-click the Databases folder and select Restore Database (Preview):

Under Restore from, switch to Backup file:

Browse to /var/opt/mssql/AdventureWorks2016.bak and complete the restoration:

Running Queries
You can now open a new query editor and execute T-SQL queries directly against the restored AdventureWorks database:


Summary
You now have a fully functional Microsoft SQL Server 2022 instance running locally on your Apple Silicon Mac:
- Server: MSSQL 2022 running containerized via Docker on Apple Silicon Rosetta emulation
- Management: Azure Data Studio native client
- Data: Full AdventureWorks sample database ready for analytics, SQL practice, and testing