AspNetCore:2.1 not found

2019-03-25 08:37发布

Created a new .NET CORE 2.1 (preview) web app. Running it in local docker with Linux container I am getting compiler error:

Error Building blobtest
Service 'blobtest' failed to build: manifest for microsoft/aspnetcore:2.1 not found.

My dotnetversion
C:\WINDOWS\system32>dotnet --version 2.1.300-preview2-008530

标签: docker
2条回答
▲ chillily
2楼-- · 2019-03-25 08:54

I had this issue as well. I thought I'd update this post to show the fix here. Thanks to Marius Bidireac for the link to the resource.

Here is an excerpt from the original docker file

FROM microsoft/aspnetcore:2.0 AS base

FROM microsoft/aspnetcore-build:2.0 AS build

Here is an excerpt from the corrected docker file

FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base

FROM microsoft/dotnet:2.1-sdk AS build
查看更多
倾城 Initia
3楼-- · 2019-03-25 08:58

They have changed the repo for .NET Core 2.1 onwards to microsoft/dotnet. Change your FROM statement to reference microsoft/dotnet using the following tags:

  • 2.1-sdk
  • 2.1-aspnetcore-runtime
  • 2.1-runtime

Documentation on how to upgrade can be found here

查看更多
登录 后发表回答