Can I run Microsoft SQL Server on docker? The answer is YES πππ
π¦Welcome to Webzone Tech Tips - I am Zidane (ιθ)Nice to see you again brother and sister
Sometime you will have to run Microsoft SQL Server on your MACOS, Ubuntu. But you cannot run Microsoft SQL Server on Macos, Ubuntu. So you need to run them on docker, that's solution method
Let's back to question on this topic
I will share with you how to use Microsoft SQL Server on docker
How to Set Up SQL Server Database with Docker
First you need to create account on docker - link download here
Access to https://www.docker.com/ and create account
Then login into docker by command docker login
πTiktok
π
Run docker and download sql server image from below page:
https://hub.docker.com/_/microsoft-mssql-server
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
Ex:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=123456" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
You will see microsoft sql server start after type docker ps -a
On this step, you had completed the deploy microsoft sql server on docker
Now let's connect to database with Azure Data Studio with below information - link download here
Connection type: Microsoft SQL Server
Server: local, 1433
Authentication type SQL Login
User name: sa
Password:
Is it easy to set up microsoft sql server on docker? If you have any issue or question while set up microsoft sql server on docker, leave your comment we can discuss about it.
Finally I will summary for you, have 5 basic steps:
1. Create account on docker
2. Login into docker by command docker login
3. Run docker and download microsoft sql server image
4. Start sql server image
5. Connect to database with Azure Data Studio
Connect SQL Server Troubleshoot issues
Sometime you will get below message after setup docker with sql server successfully
A connection was successfully established with the server, but then an error occurred during the pre-login handshake.
Troubleshoot way is just clear the current connection and reconnect again
Another topic, I also talked about Microsoft database docker compose file, on this file I will share with you guys how to build a docker compose file with MS SQL database service. I think you will be love it,
Below link here: https://learn-tech-tips.blogspot.com/2022/09/how-to-create-docker-compose-for-mssql-database-service.html
Thanks for reading
See you next time ✋
Webzone Tech Tips - Zidane