Install SQL Server 2019 Docker Image

20-11-2022
FROM mcr.microsoft.com/azure-sql-edge:latest

EXPOSE 1433


ENV SA_PASSWORD "12_34_TRS_398?"
ENV SQLCMDPASSWORD "12_34_TRS_398?"
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
   
#ADD test.bak var/test.bak

CMD /opt/mssql/bin/sqlservr

Run Existing Image with Parameters

docker run --name mssql-2019 -e ACCEPT_EULA='Y' -e SA_PASSWORD='12_34_TRS_398?'  -p 1433:1433 -t "mssql-2019"

© 2019 All rights reserved. Codesenior.COM