microsoft sql server docker code example
Example 1: docker mssql
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest
docker exec -it [id] /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "<YourStrong@Passw0rd>"
Example 2: docker sql server windows
docker pull mcr.microsoft.com/mssql/server:2019-latest
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Abcd123!" `
-p 1433:1433 --name sql1 -h sql1 `
-d mcr.microsoft.com/mssql/server:2019-latest