How to use MSSQL in cloudjiffy

1) Create a New Docker Engine CE environment from the marketplace 



2)Open web ssh and pull the docker image with the command "docker pull mcr.microsoft.com/mssql/server:2019-latest"


3)After the image pull is completed run the below command


docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=your-password' -p 1433:1433 --name sql_server_container -d mcr.microsoft.com/mssql/server:2019-latest


Note- replace your password with the strong password


4) Run the command "docker ps -a" in the web ssh and note the container id.



6)Run the below command to start the containers automatically after the docker engine CE reboot.

docker update --restart=always [container id or container name]


7) Run the below command in web ssh to login into your mssql server.

docker exec -it /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P [password you have used in above command] 

 

 


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 659