Microsoft is pretty upfront about the fact 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-blown OS for every instance, containers share the host system’s kernel and isolate the app at the process level. Basically in our case, it’s SQL Server in a pre-packaged box. Docker runs on Windows, Linux, and MacOS.
Installing Docker
Macs now come in two flavors: Intel and Apple Silicon. Docker Desktop supports both, but setup steps differ slightly. Follow the official Docker Desktop install guide and make sure to pick the version that matches your architecture.
After installing, open Docker and either sign in or create a new account.
Before you go further, the architecture thing is worth thinking about. Microsoft’s container documentation says the 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.” Every Mac sold since 2020 is Apple Silicon, so if you’re on an M-series machine you’re running an x86-64 image under emulation and you’re outside what Microsoft supports. It does run. I’ve had it running. But it’s slower than the same container on an Intel box, and if you hit something strange there’s no support path for it, which is fine for learning and not fine for anything you care about.
Docker also wants at least 2GB of RAM and 2GB of disk for the container, and the default Docker Desktop memory allocation is worth checking if the container starts and then dies on you.
Install SQL Server
Actually deploying the SQL Server is incredibly easy, and why it’s worth it over a VM in this use case. Just open the Terminal and run the following commands:
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 display the proper output, Google is your best friend. Once those issues are resolved, you’ll run the following command to pull SQL Server 2022.
docker pull mcr.microsoft.com/mssql/server:2022-latest
I’ve written the tag out here rather than leaving it off. Pulling mcr.microsoft.com/mssql/server with no tag gets you latest, which is whatever the newest release is rather than 2022, and then the docker run below asks for 2022-latest and pulls again. Not a problem, just two downloads instead of one.
Coming back to this in August 2026, there’s a 2025-latest tag now, alongside 2022-latest, 2019-latest and 2017-latest on the Docker Hub page. I’ve left 2022 in the commands below since that’s what I ran and what the title says, and swapping the tag is the only change needed. If you’re standing up a test instance and don’t need to match a particular server, I’d pull 2025.
Once that completes, run this to run your SQL Server. Edit the password before running:
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 too long to complete, but once it’s done, you have SQL Server 2022 running on your local machine on port 1433.
If the container starts and then immediately stops, the password is the usual reason. It has to be at least eight characters and meet SQL Server’s password policy, and a password that fails the check doesn’t produce an obvious error at the terminal, the container just exits. docker logs sql1 tells you what happened.
What now?
This setup isn’t meant for production, but it’s perfect for local testing, development, and learning. The one thing I’d still like to know is how much the emulation actually costs on an M-series Mac, because I’ve never sat down and compared the same workload against an x86 container to find out. It’s fast enough that I’ve never been bothered enough to measure it.
If you’re curious to explore further, check out Docker Hub and the official Microsoft SQL Server on Linux docs.
So that’s it: SQL Server on your Mac, no VM, no problem. If you’ve made it this far, congrats! You’ve officially bypassed 2015 me and saved yourself 4GB of RAM and a little bit of your soul.
Just don’t forget your sa password. Or do, and relive the setup all over again. Your call.