mssql-docker
mssql-docker copied to clipboard
mssql product key cannot be applied for mssql docker
Hi All,
I need to install mssql docker in ubuntu. I tried developer mode, standard mode and I can see that it is perfectly added. But when I tried to add the product key in MSSQL_PID environment variable, docker status is shown as Exited. I have run the command as follows. This Product Key is for MSSQL Standard.
sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_PID=A1234-B5678-C9012-D3456-E7890" -e "SA_PASSWORD=TestPassword" -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2019-latest
I would be appreciate if someone can mention whether is there is wrong in the above command?
Please check my answer in this issue. In short: It works, but your command to run the container does not satisfy SQL Server's requirements.
SA_PASSWORDis deprecated, switch toMSSQL_SA_PASSWORD- The password has to satisfy some requirements:
The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols..
So this command should do it (given that the Product Key provided for MSSQL_PID is a valid one:
docker run -e MSSQL_PID='A1234-B5678-C9012-D3456-E7890' -e MSSQL_SA_PASSWORD='<YourStrong!Passw0rd>' -e ACCEPT_EULA=Y -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2019-latest