Create Docker Container for MSSQL on Mac


As the first step we need to install Docker Mac and make sure you have Rosetta get installed, in case of using Mac with M1 or M2. These Models come with Apple Silicon. Some of the older apps come with Intel chip support, Rosetta will help you the migrate to Apple Silicon.

Docker Compose

Using the Docker-Compose we can containerise MSSQL. Here is the working Docker-Compose file.

Create a Folder called MSSQL and add Docker-Compose.yml file with following contents

version: '3.9'

services:
  mssql-azur-edge:
    image: mcr.microsoft.com/azure-sql-edge 
    platform: linux/arm64
    ports:
      - 1433:1433
    volumes:
      - ~/apps/mssql/data:/var/lib/mssqlql/data
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=mssql1Ipw

Since I’am using the Mac Min M2, which is an arm device, should specify in the platform key. Port key expose the internal port to external. Volume indicate the storage location which is optional.

In the environment key we can pass the Password for SQL Server etc.

Now . Run the Docker-compose up -d. for running the Container. If there is any problem , run this command for the log docker-compose logs

You are ready to use the sever. You can also use the Mac IP and exposed port in SQL Management studio or in a connection string as (source)

 Mac IP, 1433

Mac Mini M2 for Windows Developers

Moving from Windows to Mac


I got Mac Mini M2 last Saturday, wow. I love the Machine it saved my Desk. It is the base Model , with 8GB ,250 GB SSD.

I would like to share some of my experiences With M2. It is incredibly fast.

Running Windows 11 with Parallel VM

I’am using Parallels 8.0.1 , successfully configured windows 11 and installed Microsoft Visual Studio and it work without any trouble. Parallels allow me switch between Windows Apps and Mac Apps with ease and peace.

I did find some kinda of hanging and black out while the Mac went to sleep and wake from sleep.

Following Not working for me – Parallels

MSSQL Server

Docker

Above mentioned Apps can’t run on VM. So I decided to run it from Docker container which is on the Mac.

Apple Silicon and Docker

Some of the Docker Images not working with M2, it could be designed for Intel chip. So we need Rosetta for using such Docker images.

Installing Rosetta

Rosetta is referred as translater for Intel Mac Apps. You need not worry about any thing at all. Just install and move on.

 softwareupdate --install-rosetta

For more guides on Rosetta please visit MacHow

If you are a developer looking for Work Station with Multiple Display capabilities. Don’t wait to grab the deal today.