Home > Docker, SQL Server, SQL Server 2017 > Simple Guide to Run SQL Server 2017 in Docker (Linux Containers)

Simple Guide to Run SQL Server 2017 in Docker (Linux Containers)

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



Please run below SQL Command to check the Server name and OS Info

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 !!!

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: