Install MSSQL Server Locally

In this post we will take a look at how to install MSSQL server for local development using Docker.

  • Use Azure Edge Docker container instead of MSSQL server Docker container (for some reason MSSQL server Docker container is not working well)
    • docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=Secret123' -p 1433:1433 --name azuresqledge -d
      • Password should follow the guidelines
  • Use Azure Data Studio to connect (username is sa)
  • In Prisma use the following env variable with the connection string (because of the self-signed certificate):
    • DATABASE_URL=sqlserver://;database=ShopifyConsentManagement;user=sa;password=Secret123;encrypt=DANGER_PLAINTEXT
      • Note: Only use encrypt=DANGER_PLAINTEXT in local dev. Otherwise use encrypt=true
Share this article