How to setup MSSQL Server in 5 minutes (Ubuntu)
Open Terminal in Ubuntu
sudo mkdir /opt/mssql/data
Pull docker and install
sudo docker pull microsoft/mssql-server-linux:2017-latest
Start MSSQL docker with your custom configuration like
-e’MSSQL_SA_PASSWORD=sa@123sa’ -> Setting server admin password.
-p 1433:1433 -> Docker and System port mapping.
-v /var/opt/mssql:/var/opt/mssql -> Mounting System directory as volume to save database files.
–name mssql-2017 -> Name of docker instance
sudo docker run -e'ACCEPT_EULA=Y' -e'MSSQL_SA_PASSWORD=sa@123sa' -p 1433:1433 -v /var/opt/mssql:/var/opt/mssql --name mssql-2017 -d microsoft/mssql-server-linux:2017-latest
Managing MSSQL docker container.
Starting docker
sudo docker start mssql-2017
Stoping docker
sudo docker stop mssql-2017