For software developers, having access to a local database is crucial. However, certain databases, such as Microsoft SQL, rely on the x86_64 architecture and might not be compatible with the latest Mac computers powered by Apple Silicon’s ARM64 technology.
Can Microsoft SQL be Utilized on Any Mac?
Regrettably, Microsoft SQL lacks support across macOS platforms, including those equipped with older Intel chipsets.
In this article, I will provide a comprehensive walkthrough on how to run Microsoft SQL, a widely utilized database engine, on your high-performance Apple Silicon Mac by utilizing Docker Desktop.
Please be aware that this guide solely focuses on setting up the SQL server itself and does not encompass the supplementary tools that accompany Microsoft SQL Server.
It’s important to note that this solution serves as a temporary workaround, allowing you to engage with the database engine until a version compatible with Apple Silicon is released by Microsoft.
While some individuals have devised scripts to operate Microsoft SQL within a Windows virtual machine (VM), these approaches often lack support for TCP connections, rendering them unsuitable for applications functioning on the host machine. Hence, we will leverage Docker Desktop to execute the container and establish a connection with your Mac.
Although this is not a permanent solution, it provides a means to interact with the database engine until a native version is made available.
As of the time of writing, Docker Desktop stands as the sole container runtime environment for Apple Silicon that provides support for x86_64 containers via the Rosetta feature.
Although this feature remains in the beta phase, it adequately fulfills our requirements within this context.
Now, let’s delve into the step-by-step process.
In this article:
Prerequisites for Running Microsoft SQL on Apple Silicon Macs with Docker Desktop
To successfully run Microsoft SQL on your Apple Silicon Mac using Docker Desktop, you’ll need the following:
- An Apple Silicon processor-based Mac
- The Docker daemon and Docker Desktop UI installed on your Mac.
While you have the option to choose any user interface (UI) tool for Docker, such as Orb or Podman Desktop, this guide will focus on using Docker Desktop. For alternative tools, you’ll need to manually activate Rosetta support in the Docker daemon. Please note that this feature is in its beta stage at the time of writing.
Preparing for the Process
Before running Microsoft SQL Server, we need to configure Docker to accommodate x86-64 containers. To achieve this, we will leverage the Apple Virtualization framework with Rosetta enabled. Let’s prepare your machine for this setup.
1. Installing Docker and Docker Desktop
If you don’t have Docker and Docker Desktop installed already, you’ll need to do so before you begin.
2. Enabling x86 Emulation with Rosetta (Beta)
For users of Docker Desktop, the user interface provides a straightforward way to adjust these settings. To do this, follow these steps:
- Open Docker Desktop.
- Navigate to Settings > Features in Development.
- Locate the option labeled “Use Rosetta for x86/amd64” and select it.