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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With