Removing the ‘latest’ Tag + An Update on MCR
Published Apr 02 2019 01:32 PM 18.8K Views
Microsoft

Removing the 'latest' tag

 

With our announcement of the availability of Windows Server 2019, we informed you that the ‘latest’ tag was deprecated and would be removed from the Windows base OS image repos. We have already deprecated the ‘latest’ tag and have not been updating it to point to the latest version of an image. The next step is for us to remove it from the list of available tags. We will be removing 'latest' from the list of available tags on April 16, 2019.

 

Removing the tag will prevent scenarios where users end up downloading an image based on a version of Windows that is several versions older than they had expected. For instance, say you’re using Windows Server 2019 and want to pull the Server Core container base image with the following pull command:

 

docker pull mcr.microsoft.com/windows/servercore

 

Because a tag wasn’t specified in the pull command, the Docker client will default to pulling whichever version of the image is tagged :latest, which in this case is a Server Core image based on Windows Server 2016. This scenario is not ideal and would also occur each time someone explicitly used :latest in their pull command.

 

After the removal, pulling :latest will result in the following behavior:

 

# Try pulling with latest:
docker pull mcr.microsoft.com/windows/servercore:latest	

# Outcome:
Error response from daemon: manifest for mcr.microsoft.com/windows/servercore:latest not found

 

Note that the default pull command displayed in the upper-right corner of the Docker Hub repos under “Copy and paste to pull this image” will also result in the above behavior since they are untagged (as of April 2, 2019). We are working towards improving that experience.

 

Instead of using :latest or untagged pull commands, please declare the specific container tag (such as :1709, :1803, :1809, :ltsc2019, etc.) you would like to run in production. You can find our full tag listings at each image’s Docker Hub Repo.

 

MCR is the exclusive download source for new tags

 

Also announced in our November blog post was the news that Microsoft Container Registry has become the official host for Microsoft-published container images, while Docker Hub remains the official source for customers to discover and acquire Microsoft-published container images.

 

This is an example of how a pull reference should change to point to the MCR source:

 

# Here’s the old string for pulling a container
docker pull microsoft/windowsservercore:ltsc2016

# Change the string to the new syntax and use the same tag
docker pull mcr.microsoft.com/windows/servercore:ltsc2016

 

In January, MCR announced that as a part of the migration, existing tags from the original Docker-hosted source would also be available from the MCR source. However, new tags, beginning with tags created for the Windows Server 2019/1809 container images, can only be pulled/referenced by including the MCR repo prefix (see example above) in the Docker pull command or Dockerfile reference. The appropriate pull commands are reflected on Docker Hub today.

 

As we suggested in November, you should still change your pull/Dockerfile references to the MCR source, even if you’re using a container based on earlier versions of Windows Server.

 

For more information on the move to MCR and its value proposition, check out Steve Lasker’s blog post.

 

Conclusion

 

For more information, please visit our container docs at aka.ms/containers as well as our other blog on container tagging changes from earlier this year. Let us know your thoughts in the comments below.

 

Best,

Markos

1 Comment
Version history
Last update:
‎Jun 26 2019 02:49 PM
Updated by: