Elton Stoneman

Yes to databases in containers – Microsoft SQL Server available on Docker Store

Microsoft SQL Server 2017 is now available for the first time on multiple platforms: Windows, Linux and Docker. Your databases can be in containers with no lengthy setup and no prerequisites, and using Docker Enterprise Edition (EE) to modernize your database delivery. The speed and efficiency benefits of Docker and containerizing apps that IT Pros and developers have been enjoying for years are now available to DBAs.

 

Try the Docker SQL Server lab now and see how database containers start in seconds, and how you can package your own schemas as Docker images.

 

If you’ve ever sat through a SQL Server install, you know why this is a big deal: SQL Server takes a while to set up, and running multiple independent SQL Server instances on the same host is not simple. This complicates maintaining dev, test and CI/CD systems where tests and experiments might break the SQL Server instance.

With SQL Server in Docker containers, all that changes. Getting SQL Server is as simple as running `docker image pull`, and you can start as many instances on a host as you want, each of them fresh and clean, and tear them back down when you’re done.

Database engines are just like any other server-side application: they run in a process that uses CPU and memory, they store state to disk, and they make services available to clients over the network. That all works the same in containers, with the added benefit that you can limit resources, manage state with volume plugins and restrict network access.

Many Docker customers are already running highly-available production databases in containers, using technologies like Postgres. Now the portability, security and efficiency you get with Docker EE is available to SQL Server DBAs.

 

Modernize your database delivery with Docker


Traditional database delivery is difficult to fit into a modern CI/CD pipeline, but Docker makes it easy. You use Microsoft’s SQL Server Docker image and package your own schema on top, using an automated process. Anyone can run any version of the database schema, just by starting a container – they don’t even need to have SQL Server installed on their machine.

This is the database delivery workflow with Docker:

sql-ci.jpg

  1. DBA pushes schema changes to source control
  2. CI process packages the schema into a Docker image based on Microsoft-published SQL Server base images
  3. CI process runs test suites using disposable database containers created from the new image
  4. CD process upgrades the persistent database container in the test environment to the new image
  5. CD process runs a database container to upgrade the production database, applying diff scripts to align the schema to the new image

The whole process of packaging, testing, distributing and upgrading databases can be automated with Docker. You run database containers in development and test environments which are fast, isolated, and have identical schema versions. You can continue using your existing production database, but use the tested Docker image to deploy updates to production.

Support and availability

Docker Enterprise Edition is a supported platform for running SQL Server in Linux in containers in production. SQL Server for Linux is a certified container image which means you have support from Microsoft and Docker to resolve any issues.

On Windows Server and Windows 10 you can run SQL Server Express in containers with Docker, to modernize your database delivery process for existing SQL Server deployments, without changing your production infrastructure.

The new SQL containers will be available for download in Docker Store in October – but you can start testing with the pre-GA containers in Store today. Already there have been over 1 million downloads from Docker Hub of the SQL Server preview for Linux containers.

To learn more about Docker solutions for IT:

, , ,

Elton Stoneman

Yes to databases in containers – Microsoft SQL Server available on Docker Store


3 Responses to “Yes to databases in containers – Microsoft SQL Server available on Docker Store”

  1. Karobia Anwar

    How to download and install Sql Server 2017

    Reply
  2. chris

    When I run 1 instance of microsoft/mssql-server-windows it works with no problems but when I try to launch a second container it returns

    Error response from daemon: failed to create endpoint hungry_kilby on network nat: HNS failed with error : The object already exists.

    docker run –name=sql -d -p 1433:1433 -e sa_password=somegr8pw -e ACCEPT_EULA=Y microsoft/mssql-server-windows

    Any ideas?

    Reply

Leave a Reply to Karobia Anwar

Click here to cancel reply.

Get the Latest Docker News by Email

Docker Weekly is a newsletter with the latest content on Docker and the agenda for the upcoming weeks.