Install and run MSSQL Server in Docker




Short manual how to execute MSSQL server in Docker in Windows 11. For linux there are the same steps but instead of PowerShell you should use terminal and don’t forget about sudo.

Powershell:

The first command In PowerShell is:

sudo docker pull mcr.microsoft.com/mssql/server:2022-latest

It will download docker image with MSSQL server.

The second command I’ve got from vendor’s website.

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>" -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2022-latest

Otherwise you can start the container with GUI

GUI of the creating MSSQL Server container in Docker

Password for the container form command line is '<YourStrong@Passw0rd>’, admin login is SA, dbname sql1.




1 Comment »

  1. […] server is also run with docker, you can read about how to start it here (http://markimarta.com/sql/install-and-run-mssql-server-in-docker/). There is no need to add something for MS SQL Server to the […]

    Pingback by Dapper with PostgreSQL and MSSQL Server « MarkiMarta.com — May 29, 2023 @ 3:43 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment





MarkiMarta.com. Notes of web-specialist
Since 2009
18+