How to use mssql on MacBook m1 (with docker)?
Hello guys,
How to use mssql on MacBook m1? I gonna explain that with a small example.
I needed a database but mssql while creating an application on m1 macos. I created a pretty small docker compose even was enough when I completed the application because I used to mssql configuration. If we need an mssql on a dotnet project we can simply use “mcr.microsoft.com/mssql/server:2019-latest” but when you are using m1, you need “mcr.microsoft.com/azure-sql-edge”.
My exam docker-compose.yaml below,
version: '3.8'
services:
sqlserver:
image: "mcr.microsoft.com/azure-sql-edge"
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "password35"
MSSQ_PID: "Express"
ports:
- "1433:1433"
Additionally,
You get an error about TCP when you using database. You should add “TrustServerCertificate=true” on the connection string.
I hope this help to you.