SQL Server 2017 is now supported in Windows, Linux and Docker platform
In previous posts, we saw
How to upgrade SQL Server 2017 on Ubuntu Linux to RTM Version
Simple Guide to provision SQL Server 2017 on Linux in Azure VM
In this post, we will see How to download and run SQL Server 2017 in Docker using Linux Containers
Step 1: Verify and Configure Docker Memory Settings, By default Docker is installed with 2 GB as Configured Memory usage, but SQL Server 2017 needs Min 4 GB RAM
Step 2: Open Powershell and run below command to check the current Docker images
docker ps
Currently we don’t have any images
Step 3: Run below command to download SQL Server 2017 Docker image
docker pull microsoft/mssql-server-linux:2017-latest
Depending on the internet speed, the download will take time
You can verify the downloaded images by running below command
docker images
Step 4: Run below command to start the Docker image and configure SQL Server 2017
docker run -e “ACCEPT_EULA=Y” -e “MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>” -p 1401:1433 –name sql1 -d microsoft/mssql-server-linux:2017-latest
Please change the Name, Port and Password as per your requirements, once the container is started, Please run below command to check the status of container
docker ps
We can see the container is up and running
Please launch Management Studio and connect to docker container by using the IP Address:Port, since its local machine, we will be using localhost,1401
Please run below SQL Command to verify the version of SQL Server
SELECT @@VERSION
Please run below SQL Command to check the Server name and OS Info
SELECT @@SERVERNAME [ServerName],
host_platform,
host_distribution,
host_release,
host_service_pack_level,
host_sku,
os_language_version
FROM sys.dm_os_host_info
Please note that Server name will be the Container ID and not the Container name
Hope you find this post helpful !!!