{"id":33974,"date":"2021-08-16T14:43:10","date_gmt":"2021-08-16T21:43:10","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=33974"},"modified":"2021-08-17T14:58:26","modified_gmt":"2021-08-17T21:58:26","slug":"net-core-2-1-container-images-will-be-deleted-from-docker-hub","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/net-core-2-1-container-images-will-be-deleted-from-docker-hub\/","title":{"rendered":".NET Core 2.1 container images will be deleted from Docker Hub"},"content":{"rendered":"<p>Starting on August 21st, .NET Core 2.1 Docker container images will no longer be available on Docker Hub, but exclusively on Microsoft Container Registry (MCR). This change was previously announced with <a href=\"https:\/\/github.com\/dotnet\/dotnet-docker\/issues\/2848\">dotnet\/dotnet-docker #2848<\/a>. If you are reliant on .NET Core 2.1 images on Docker Hub, you should switch to using MCR immediately. Please reach out at dotnet@microsoft.com if this change is a problem for you \/ your organization.<\/p>\n<p>We started <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/net-core-container-images-now-published-to-microsoft-container-registry\/\">publishing .NET images to MCR<\/a> in early 2019, including for .NET Core 2.1. .NET Core 3 and later versions were published exclusively to MCR. The benefits of MCR are discussed in the referenced post.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/net-core-2-1-will-reach-end-of-support-on-august-21-2021\/\">.NET Core 2.1 will go out of support<\/a> on August 21st. .NET Core 2.1 images will remain available on MCR. However, you are encouraged to immediately move to a later .NET version since .NET Core 2.1 will no longer be supported starting on the 21st. .NET Core 2.1 was <a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/releases.md\">supported for three years<\/a> starting in <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/net-core-august-2018-update\/\">August 2018<\/a> after being <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-2-1\/\">released in May of that year<\/a>.<\/p>\n<p>The rest of the post demonstrates the changes that you should make to pull .NET container images from MCR instead of Docker Hub.<\/p>\n<h2>Pulling images from MCR<\/h2>\n<p><a href=\"https:\/\/hub.docker.com\/_\/microsoft-dotnet\">.NET images<\/a> are available on MCR from the following repos:<\/p>\n<ul>\n<li><code>mcr.microsoft.com\/dotnet\/runtime-deps<\/code><\/li>\n<li><code>mcr.microsoft.com\/dotnet\/runtime<\/code><\/li>\n<li><code>mcr.microsoft.com\/dotnet\/aspnet<\/code><\/li>\n<li><code>mcr.microsoft.com\/dotnet\/sdk<\/code><\/li>\n<\/ul>\n<p>You need to make the following transformations to pull .NET Core 2.1 images from MCR instead of Docker Hub.<\/p>\n<p>For the SDK:<\/p>\n<pre><code class=\"language-Dockerfile\">\r\nmicrosoft\/dotnet:2.1-sdk -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1\r\nmicrosoft\/dotnet:2-sdk -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1\r\nmicrosoft\/dotnet:2.1-sdk-stretch -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1-stretch\r\nmicrosoft\/dotnet:2.1-sdk-stretch-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1-stretch-arm32v7\r\nmicrosoft\/dotnet:2.1-sdk-nanoserver-1809 -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1-nanoserver-1809\r\nmicrosoft\/dotnet:2.1-sdk-alpine -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1-alpine\r\nmicrosoft\/dotnet:2.1-sdk-bionic -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1-bionic\r\nmicrosoft\/dotnet:2.1-sdk-bionic-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1-bionic-arm32v7\r\nmicrosoft\/dotnet:latest -&gt; mcr.microsoft.com\/dotnet\/sdk:2.1<\/code><\/pre>\n<p>For the ASP.NET Core:<\/p>\n<pre><code class=\"language-Dockerfile\">\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1\r\nmicrosoft\/dotnet:2-aspnetcore-runtime-&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime-stretch-slim -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1-stretch-slim\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime-stretch-slim-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1-stretch-slim-arm32v7\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime-nanoserver-1809 -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1-nanoserver-1809\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime-alpine -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1-alpine\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime-bionic -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1-bionic\r\nmicrosoft\/dotnet:2.1-aspnetcore-runtime-bionic-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1-bionic-arm32v7\r\nmicrosoft\/dotnet:aspnetcore-runtime-&gt; mcr.microsoft.com\/dotnet\/aspnet:2.1<\/code><\/pre>\n<p>For .NET Runtime:<\/p>\n<pre><code class=\"language-Dockerfile\">\r\nmicrosoft\/dotnet:2.1-runtime -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1\r\nmicrosoft\/dotnet:2-runtime -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1\r\nmicrosoft\/dotnet:2.1-runtime-stretch-slim -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1-stretch-slim\r\nmicrosoft\/dotnet:2.1-runtime-stretch-slim-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1-stretch-slim-arm32v7\r\nmicrosoft\/dotnet:2.1-runtime-nanoserver-1809 -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1-nanoserver-1809\r\nmicrosoft\/dotnet:2.1-runtime-alpine -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1-alpine\r\nmicrosoft\/dotnet:2.1-runtime-bionic -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1-bionic\r\nmicrosoft\/dotnet:2.1-runtime-bionic-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1-bionic-arm32v7\r\nmicrosoft\/dotnet:runtime -&gt; mcr.microsoft.com\/dotnet\/runtime:2.1<\/code><\/pre>\n<p>For .NET Runtime dependencies:<\/p>\n<pre><code class=\"language-Dockerfile\">\r\nmicrosoft\/dotnet:2.1-runtime-deps -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1\r\nmicrosoft\/dotnet:2.1-runtime-deps-stretch-slim -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1-stretch-slim\r\nmicrosoft\/dotnet:2.1-runtime-deps-stretch-slim-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1-stretch-slim-arm32v7\r\nmicrosoft\/dotnet:2.1-runtime-deps-alpine -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1-alpine\r\nmicrosoft\/dotnet:2.1-runtime-deps-bionic -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1-bionic\r\nmicrosoft\/dotnet:2.1-runtime-deps-bionic-arm32v7 -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1-bionic-arm32v7\r\nmicrosoft\/dotnet:runtime-deps -&gt; mcr.microsoft.com\/dotnet\/runtime-deps:2.1<\/code><\/pre>\n<h2>Summary<\/h2>\n<p>We have been working closely with Docker Inc. for multiple years to transition Microsoft container images to Microsoft Container Registry. Given the popularity of .NET images, we chose the .NET Core 2.1 end-of-support date as the final date for hosting .NET images on Docker Hub. As stated earlier, .NET Core 2.1 images have been available on MCR since 2019 and .NET Core 3 and later images versions have been exclusively available on MCR. Please move to MCR for pulling all .NET container images and to a <a href=\"https:\/\/github.com\/dotnet\/core\/blob\/main\/releases.md\">supported .NET version<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting on August 21st, .NET Core 2.1 Docker container images will no longer be available on Docker Hub, but exclusively on Microsoft Container Registry (MCR). Read on for more information.<\/p>\n","protected":false},"author":1312,"featured_media":33980,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,196,7237],"tags":[],"class_list":["post-33974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-dotnet-core","category-containers"],"acf":[],"blog_post_summary":"<p>Starting on August 21st, .NET Core 2.1 Docker container images will no longer be available on Docker Hub, but exclusively on Microsoft Container Registry (MCR). Read on for more information.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/33974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/1312"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=33974"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/33974\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/33980"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=33974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=33974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=33974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}