In this post, you use Docker to pull and run the SQL Server Linux container image and see the demo of connecting from SQL Server Management Studio (SSMS).
Open your PowerShell with elevated permission and run the following command. It pulls the SQL Server 2022 (16.x) Linux container image from the Microsoft Container Registry.
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<password>" -p 1433:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2022-latest

Parameter | Description |
---|---|
-e “ACCEPT_EULA=Y” | confirm your acceptance of the End-User Licensing Agreement. |
-e “MSSQL_SA_PASSWORD=” | Specify your own strong password. |
-p 1433:1433 | Map a TCP port on the host environment (first value) with a TCP port in the container (second value). |
–name sql1 | Name of the container |
–hostname sql1 | Container hostname |
-d | Run the container in the background daemon |
mcr.microsoft.com/mssql/server:2022-latest | The SQL Server Linux container image. |
Run the following command, “docker ps” to view your Docker containers.

If the STATUS column shows Up, then SQL Server is running in the Docker container and listening on the port.
Docker engine,

Connect the SQL Server from SSMS,

List all the database,

Test database,

Source: Read More