[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
How to install SQL Server 2019 on a Docker container

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

How to install SQL Server 2019 on a Docker container.


Applies to: Microsoft SQL Server 2019, Windows 10, Docker Desktop for Windows 10.

Date created: September 19, 2020.


This article will guide you on how to use Docker Desktop to pull and run the latest SQL Server 2019 container image.


Prerequisites.

bulletInstall Windows Subsystem for Linux (WSL2) from here.
bulletDownload and install Docker Desktop for Windows from here.
bulletDownload and install Microsoft ODBC Driver for SQL Server from here.
bulletDownload and install Microsoft Command Line Utilities 14.0 for SQL Server from here.

 

Step-by-Step procedure.

Open the Windows PowerShell, and let's pull the latest SQL Server 2019 container image from Microsoft Container Registry.

 





The previous command pulls the SQL Server 2019 container image based on Ubuntu.



 




To run the container image with Docker, you can use the following command on an elevated PowerShell command prompt.





To view your Docker containers, use the "docker ps" command.






Getting connected to SQL Server 2019.


If you installed Microsoft Command Line Utilities 14.0 for SQL Server, then you can use the sqlcmd (a SQL Server command-line), inside the container to connect to SQL Server.






With the above command we can see the build of SQL Server 2019 that was installed.




Remove the container.


If you want to later remove the SQL Server container, just run the following commands:


First, stop the container.


 
Finally, remove the definition of the conatiner.






 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.