In today’s article, I will explain Docker and SQL Server 2017 Installation On WindowsVM In Azure.
In my previous article, I told you how to install Docker and SQL Server 2017 on LinuxVM on Azure.
This article, I will be telling you about the “Windows Server 2016 Datacenter – with Containers”, which we will install on Azure, and the installation of Docker and SQL Server 2017.
1) We log in to the Microsoft Azure portal.
2) By saying “Add” from the Virtual Machines section, we search for “Search” → Windows Server 2016 Datacenter – with Containers.
3) We start the Virtual Machine installation. The installation steps are as follows.
In the “Choose a size” section, I will be trying to choose a server with the features I chose on the Linux server so that we can easily do the Linux / Windows Test of Docker.
In the “Settings” section, I suggest you make the settings you want, especially in the Network Security section. I have defined HTTP / HTTPS / RDP / MSSQL Server privilege for our example.
After the definitions, the summary information is as follows.
Now that the installation of our server is completed, we can connect to our server via RDP and perform the necessary operations.
After performing the RDP process, we look at the docker version with powershell.
As you can see, by installing “Windows Server 2016 Datacenter – with Containers”, we have the docker setup ready. What we will do now is to install SQL Server 2017. For this, we need to pull SQL Server 2017 first.
1 | docker pull microsoft/mssql-server-windows-developer |
After the pull process is complete, we can use the following code for installation
1 | docker run -e ACCEPT_EULA=Y -e SA_PASSWORD=’6.rq=^DP;Jn;w%|FVEPZ’ -p 1433:1433 –name WinDockerSQL -d microsoft/mssql-server-windows-developer |
After the process is complete, we can use the docker ps command to control the container.
As you can see, we have completed the Docker installation on Windows and installed the SQL Server 2017 Developer edition. Now it’s time to connect to this sql server. For this;
If you want to connect with local IP, as a result you have a docker running on windows server. You need to use the inspect command to learn the details of the container. I am sharing the example below.
If you want to search for any expression with the Inspect code, its usage is as follows.
1 | docker container inspect –format ‘{{.NetworkSettings.Networks.nat.IPAddress }}’ WinDockerSQL |
As you can see, we have completed the Docker installation on Windows and installed the SQL Server 2017 Developer edition. Now it’s time to connect to this sql server. For this;
We have also installed SQL Server 2017 Developer edition on a Docker on Windows.
But the most important part here is to give a strong password for the SA password, otherwise you will not be able to connect to the sql server.
If you want to see the container logs, you can access the logs if you type docker logs WinDockerSQL.
(WinDockerSQL, you can write the name of the container we installed, as well as the container id information. You can access this information with the docker ps command.)