Microsoft is pretty upfront about the fact that SQL Server doesn’t run natively on macOS. Back in college, I learned this the hard way. I bought a Windows license, spun up a VirtualBox VM on my 8GB MacBook Pro, and limped my way through installing SQL Server 2016 for a database class. It was miserable.
If only 2015 Chandler knew about Docker.
What is Docker?
If you’ve used virtual machines, think of containers as a leaner, more efficient alternative. Instead of virtualizing hardware and running a full operating system for every instance, containers share the host system’s kernel and isolate the app at the process level. In our case, it’s SQL Server in a pre-packaged box. Docker runs on Windows, Linux, and macOS.
Installing Docker
Macs come in two flavors: Intel and Apple Silicon. Docker Desktop supports both, but the setup steps differ slightly. Follow the official Docker Desktop install guide and make sure to pick the version that matches your Mac.
After installing, open Docker Desktop.
The difference between the two kinds of Mac matters for SQL Server too. Microsoft’s container quickstart says the SQL Server images “are supported only on Linux hosts running on Intel and AMD x86-64 CPUs,” and that “emulation or translation environments (for example, Rosetta 2, Prism, or QEMU) aren’t tested or supported.” On an Apple Silicon Mac, the container runs under emulation, which is outside what Microsoft supports. That’s fine for learning and local testing, but if something strange happens, there’s no support path for it.
The same page lists at least 2 GB of RAM and 2 GB of disk space as prerequisites, so check how much memory Docker Desktop is allowed to use if the container has trouble staying up.
Install SQL Server
Actually deploying SQL Server is easy, and it’s the reason this is worth doing over a VM. Open Terminal and check that Docker is working:
docker version
If that fails with -bash: docker: command not found, Docker may not be in your system’s PATH. I fixed this with:
sudo ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker
If docker version still doesn’t work, search for the error you’re getting. Once it does, pull the SQL Server 2022 image:
docker pull mcr.microsoft.com/mssql/server:2022-latest
Once that completes, start the container. Change the password before running it:
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<password>" \
-p 1433:1433 --name sql1 --hostname sql1 \
-d \
mcr.microsoft.com/mssql/server:2022-latest
This shouldn’t take long. When it’s done, you have SQL Server 2022 running on your local machine on port 1433.
The password has to follow SQL Server’s default password policy. Microsoft’s quickstart says that means at least eight characters, drawn from three of these four sets: uppercase letters, lowercase letters, digits, and symbols. If the password doesn’t meet that, the page says “the container can’t set up SQL Server, and stops working.” docker logs sql1 shows the error log so you can see why.
The image tags on Docker Hub now include 2025-latest alongside 2022-latest, 2019-latest and 2017-latest. To run a different version, swap the tag in both commands.
What now?
This setup isn’t meant for production, but it’s great for local testing, development, and learning. If you want to go further, these are good places to start:
That’s SQL Server on a Mac without a VM, which would have saved 2015 me 4GB of RAM.