Skip to content
Home » SQL Server containers no longer being updated in the Docker registry

SQL Server containers no longer being updated in the Docker registry

  • by
Ship Containers

In October 2018, Microsoft announced a change to the source of their Docker containers. You should be using the new Microsoft Container Registry (MCR) as the source for official Docker container images for Microsoft products.

While existing container images in the Docker Hub are not affected, you may not get updated images unless you switch.

Where this may impact you is with SQL Server in a DevOps environment. Every few months, Cumulative Updates are released for SQL Server 2017 (and 2019, when it is released). If your environment was set up to pull container images from the old registry, you may find that the latest build from there is from November 2018, and currently two versions old:

Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)
Nov 30 2018 12:57:58
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)

Fortunately it is fairly easy to update the container source to use the Microsoft Container Registry instead.

Old way (pulling from Docker Hub):

sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<StrongPassword>' -p 1433:1433 -h sql2017 -d microsoft/mssql-server-linux:2017-latest

New way (pulling from Microsoft Container Registry):

sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<StrongPassword>' -p 1433:1433 -h sql2017 -d mcr.microsoft.com/mssql/server:2017-latest

Notice that the -d switch has been modified.

Once you update the source to pull the container image from this new registry, you’ll find the expected version (as of the writing of this post):

Microsoft SQL Server 2017 (RTM-CU15) (KB4498951) - 14.0.3162.1 (X64)
May 15 2019 19:14:30
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.6 LTS)

I hope this helps someone trying to figure out why their DevOps environment might not be updating as expected.

Leave your thoughts in the comments below.

Photo by Guillaume Bolduc on Unsplash.