skip to Main Content

I have been trying to download SQL Server on my Mac with an Apple Chip. I’ve been following the steps that include downloading docker and entering code into my terminal to set up the images and containers within docker. However, when I try and type in this code:

docker run --name SQLServer -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=12345OHdf%e' -e 'MSSQL_PID=Express’ -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest

I get the following response in terminal:

WARNING: The requested image’s platform (linux/amd64) does not match
the detected host platform (linux/arm64/v8) and no specific platform
was requested
a1c6173553fc3ae53d28cc4c8bef452fdd322bf1ab2074124803c2275a97e587

I was wondering if anybody would be able to help me in fixing this problem

4

Answers


  1. From the docker docs:

    "Not all images are available for ARM64 architecture. You can add
    –platform linux/amd64 to run an Intel image under emulation. In particular, the mysql image is not available for ARM64. You can work
    around this issue by using a mariadb image."

    Login or Signup to reply.
  2. Using the azure sql edge docker image and installing mssql tool separately worked for us.

    This is the Dockerfile

    FROM mcr.microsoft.com/azure-sql-edge:latest
    
    EXPOSE 1433
    
    COPY ./database/schema.sql /database/schema.sql
    
    ENV SA_PASSWORD "MyP@w0rd"
    ENV SQLCMDPASSWORD "MyP@w0rd"
    ENV ACCEPT_EULA "Y"
    
    RUN (mkdir -p /opt/mssql-tools/bin && cd /opt/mssql-tools/bin && wget https://github.com/microsoft/go-sqlcmd/releases/download/v0.8.0/sqlcmd-v0.8.0-linux-arm64.tar.bz2 
        && bzip2 -d sqlcmd-v0.8.0-linux-arm64.tar.bz2 && tar -xvf sqlcmd-v0.8.0-linux-arm64.tar && chmod 755 sqlcmd)
    
    RUN  /opt/mssql/bin/sqlservr & sleep 20 && 
         /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -d master 
         -Q "create database testdb;" && 
         /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -d master -i  /database/schema.sql
    
    
    CMD /opt/mssql/bin/sqlservr
    
    
    Login or Signup to reply.
  3. I have followed the tutorial on the website but I can’t connect azure data studio to the SQL Server instance … while he is running
    @Aaron Bertrand

    I finally use Azure Sql Database instead of SSMS

    Login or Signup to reply.
  4. A bit late to the party but here’s a workaround for this using an open source tool called Lima and Rosetta as the VM: https://dev.to/srburnham/forget-azure-sql-edge-on-a-m1-mac-run-full-blown-sql-server-linux-instead-a-how-to-6d2. Saves you from having to resort to the cutdown edge version.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search