Azure SQL Edge Docker Setup Guide

This guide will walk you through the process of setting up an Azure SQL Edge instance using Docker. This has been tested with Apple Macbook Pro M1.

Prerequisites

  • Docker installed on your machine
  • Docker Compose installed on your machine
  • clone this repo to your computer.

Setup

Environment Variables

The SA_PASSWORD environment variable is required for the SQL Server instance. This will be the password for the sa login on the SQL Server instance. This variable is stored in a .env file in the same directory as your docker-compose.yml file.

The .env file should look something like this:

SA_PASSWORD=YourStrongPassword

Replace YourStrongPassword with a strong password of your choice.

Start the Docker Container

Navigate to the directory containing the docker-compose.yml and .env files. You can start the Docker container by running the following command:

docker-compose up -d

The -d option will start the Docker container in detached mode, meaning it will run in the background. If you want to see log you can start without -d

Verify the Docker Container is Running

You can verify that the Docker container is running by executing the following command:

docker ps

You should see your azure-sql-edge service listed in the output.

Connecting to the SQL Server Instance

You can connect to the SQL Server instance using any SQL Server client, such as Azure Data Studio. The server name will be localhost,1433 and the login will be sa with the password you set in the .env file.

Remember to replace YourStrongPassword with a strong password of your choosing. The password must meet SQL Server's password requirements.

Azure Data Studio

If you want to import .bacpac to your server you need Azure Data Studio and Admin Pack add on to it

image Now you can just import these files to your server.

Happy coding!