  docker rm -f mssql2017 2>/dev/null

docker run -d \
    --name mssql2017 \
    --memory="512m" \
    --memory-swap="4g" \
    --memory-reservation="384m" \
    -e "ACCEPT_EULA=Y" \
    -e "MSSQL_SA_PASSWORD=Asde71.4Asde71.4" \
    -e "MSSQL_PID=Express" \
    -e "MSSQL_MEMORY_LIMIT_MB=512" \
    -v /home/andres/mssql/data:/var/opt/mssql/data \
    -v /home/andres/mssql/log:/var/opt/mssql/log \
    -p 1433:1433 \
    mcr.microsoft.com/mssql/server:2017-latest



 sleep 20
  docker exec mssql2017 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa \
    -P 'Asde71.4Asde71.4' -Q "
  EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
  EXEC sp_configure 'max server memory', 512; RECONFIGURE;
  "
