报错
今天在一台新的服务器中pull microsoft/dotnet的时候报错了
docker: Error response from daemon: pull access denied for microsoft/dotnet, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
原因
这是因为.NET Core 2.1 和 2.2 容器映像已从 Docker Hub 中删除。 他们于 2021 年 8 月 21 日将这些映像移到了 Microsoft 容器注册表 (MCR)。
使用docker pull mcr.microsoft.com/dotnet/sdk:2.1
来代替 docker pull microsoft/dotnet
。
MCR 上的 .NET 映像可从以下存储库获得:
- mcr.microsoft.com/dotnet/runtime-deps
- mcr.microsoft.com/dotnet/runtime
- mcr.microsoft.com/dotnet/aspnet
- mcr.microsoft.com/dotnet/sdk
具体的替换
SDK
microsoft/dotnet:2.1-sdk -> mcr.microsoft.com/dotnet/sdk:2.1
microsoft/dotnet:2-sdk -> mcr.microsoft.com/dotnet/sdk:2.1
microsoft/dotnet:2.1-sdk-stretch -> mcr.microsoft.com/dotnet/sdk:2.1-stretch
microsoft/dotnet:2.1-sdk-stretch-arm32v7 -> mcr.microsoft.com/dotnet/sdk:2.1-stretch-arm32v7
microsoft/dotnet:2.1-sdk-nanoserver-1809 -> mcr.microsoft.com/dotnet/sdk:2.1-nanoserver-1809
microsoft/dotnet:2.1-sdk-alpine -> mcr.microsoft.com/dotnet/sdk:2.1-alpine
microsoft/dotnet:2.1-sdk-bionic -> mcr.microsoft.com/dotnet/sdk:2.1-bionic
microsoft/dotnet:2.1-sdk-bionic-arm32v7 -> mcr.microsoft.com/dotnet/sdk:2.1-bionic-arm32v7
microsoft/dotnet:latest -> mcr.microsoft.com/dotnet/sdk:2.1
ASP.NET Core:
microsoft/dotnet:2.1-aspnetcore-runtime -> mcr.microsoft.com/dotnet/aspnet:2.1
microsoft/dotnet:2-aspnetcore-runtime-> mcr.microsoft.com/dotnet/aspnet:2.1
microsoft/dotnet:2.1-aspnetcore-runtime-stretch-slim -> mcr.microsoft.com/dotnet/aspnet:2.1-stretch-slim
microsoft/dotnet:2.1-aspnetcore-runtime-stretch-slim-arm32v7 -> mcr.microsoft.com/dotnet/aspnet:2.1-stretch-slim-arm32v7
microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-1809 -> mcr.microsoft.com/dotnet/aspnet:2.1-nanoserver-1809
microsoft/dotnet:2.1-aspnetcore-runtime-alpine -> mcr.microsoft.com/dotnet/aspnet:2.1-alpine
microsoft/dotnet:2.1-aspnetcore-runtime-bionic -> mcr.microsoft.com/dotnet/aspnet:2.1-bionic
microsoft/dotnet:2.1-aspnetcore-runtime-bionic-arm32v7 -> mcr.microsoft.com/dotnet/aspnet:2.1-bionic-arm32v7
microsoft/dotnet:aspnetcore-runtime-> mcr.microsoft.com/dotnet/aspnet:2.1
.NET Runtime:
microsoft/dotnet:2.1-runtime -> mcr.microsoft.com/dotnet/runtime:2.1
microsoft/dotnet:2-runtime -> mcr.microsoft.com/dotnet/runtime:2.1
microsoft/dotnet:2.1-runtime-stretch-slim -> mcr.microsoft.com/dotnet/runtime:2.1-stretch-slim
microsoft/dotnet:2.1-runtime-stretch-slim-arm32v7 -> mcr.microsoft.com/dotnet/runtime:2.1-stretch-slim-arm32v7
microsoft/dotnet:2.1-runtime-nanoserver-1809 -> mcr.microsoft.com/dotnet/runtime:2.1-nanoserver-1809
microsoft/dotnet:2.1-runtime-alpine -> mcr.microsoft.com/dotnet/runtime:2.1-alpine
microsoft/dotnet:2.1-runtime-bionic -> mcr.microsoft.com/dotnet/runtime:2.1-bionic
microsoft/dotnet:2.1-runtime-bionic-arm32v7 -> mcr.microsoft.com/dotnet/runtime:2.1-bionic-arm32v7
microsoft/dotnet:runtime -> mcr.microsoft.com/dotnet/runtime:2.1
.NET Runtime dependencies:
microsoft/dotnet:2.1-runtime-deps -> mcr.microsoft.com/dotnet/runtime-deps:2.1
microsoft/dotnet:2.1-runtime-deps-stretch-slim -> mcr.microsoft.com/dotnet/runtime-deps:2.1-stretch-slim
microsoft/dotnet:2.1-runtime-deps-stretch-slim-arm32v7 -> mcr.microsoft.com/dotnet/runtime-deps:2.1-stretch-slim-arm32v7
microsoft/dotnet:2.1-runtime-deps-alpine -> mcr.microsoft.com/dotnet/runtime-deps:2.1-alpine
microsoft/dotnet:2.1-runtime-deps-bionic -> mcr.microsoft.com/dotnet/runtime-deps:2.1-bionic
microsoft/dotnet:2.1-runtime-deps-bionic-arm32v7 -> mcr.microsoft.com/dotnet/runtime-deps:2.1-bionic-arm32v7
microsoft/dotnet:runtime-deps -> mcr.microsoft.com/dotnet/runtime-deps:2.1
详见dotnet/announcements 的github文档:https://github.com/dotnet/announcements/issues/197
网友评论