Docker and SQL Server on Linux
SQL Server 2017 is the biggest release and most important releases in the Microsoft product history simply because of the freedom that it gives to install the product anywhere. The advent of the Docker containers and growing emphasis on open source solutions opened the door to greater technological innovation and advancement.
Let’s go through the following subjects:
- Introduction to Docker container
- Pre-requisite to build Docker container
- A walkthrough of the setup process to build a SQL Server instance running on the Linux CentOS and in a Docker container
- How to connect to the database engine
- How to connect to the database engine externally
- And more…
So let’s get started exploring the new-found Docker container.
Introduction
Docker provides an elegant platform for API packaging for container management. It eases out the complex design process of application packaging by incorporating the dependent components into the container image.
The support for Linux and Docker containers came with the release of SQL Server 2017, which opens up the various options for installing and working with SQL Server 2017 on those platforms. SQL Server 2017 is no longer a platform dependent of the database offering. Its footprint is widespread across other flavors of the operating system as well. This new capability allows developers and open source users to test the full-fledged SQL Server instance at a lower cost.
Prerequisites
- Docker Engine 1.8+ on any supported Linux distros or have an up-to-date version of Docker for Mac or Windows
- Min of 2 GB of dedicated disk space
- Min of 2 GB of RAM dedicated to Docker
- System requirements for SQL Server on Linux
In this quickstart, we will learn how to install the Docker on Linux distros and how to incorporate the SQL Server 2017 container image. In this case, Docker provides a platform to bundle only the required resources for SQL Server 2017 into a fully self-contained unit. In the case, the container will include only the pieces of the operating system that it required, including any drivers, system libraries, or other resources needed to make SQL Server instance fully functioning. This option keeps the size down since only the bare minimum components are included in the container.
This capability makes containers highly portable since they don’t have any external dependencies. It is possible to create a Docker image on one machine, then move or copy it to another and ensure that it’ll still work in the same way.
Microsoft offers a number of different container images that we can pull. They will be identified by tags during the installation process. In most cases, we’d specify a 2017-latest image to get the most current version of SQL Server 2017, but there is an option to pull an image with an earlier cumulative update as well. On this site, we can see the different tags that are available for the Docker images.
Now it’s time to try to install Docker on Linux and to connect to SQL Server. You can find detailed example with code and screenshots here — https://goo.gl/Po6Djs.
Thank you for yuor time and attention!