【发布时间】:2019-05-09 01:13:24
【问题描述】:
我有一个在 Docker 容器(2.1-aspnetcore-runtime)中运行的 ASP.NET Core 应用程序。
带有应用程序的 docker 容器运行了两个月没有任何问题。最近我不得不更新 AppSettings 中的 ConnectionString。所以我更改了 JSON 文件并部署了一个新的 docker 版本。
这导致了以下消息:
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.6' was not found.
- Check application dependencies and target a framework version installed at:
/usr/share/dotnet/
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are installed:
2.1.4 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
为什么应用程序突然需要“2.1.6”版本?应用程序没有改变,两个月前“2.1.6”版本甚至都不存在。
除此之外,还有一个用于“2.1.6”(2.1.6-aspnetcore-runtime)的特定 Docker 容器。为什么普通的“2.1-aspnetcore-runtime”容器中没有最新版本?
【问题讨论】:
-
为什么普通的“2.1-aspnetcore-runtime”容器中没有最新版本?您可能在创建(或运行)之前没有运行
docker pull microsoft/dotnet:2.1-aspnetcore-runtime你的码头集装箱。如果您不这样做,它将使用最新的 locally tagged 版本(但不是 docker hub 上该标签可用的最新版本),因为microsoft/dotnet:2.1-aspnetcore-runtime将指向较新的次要版本当他们出来的时候,但这需要一个新的拉动才能得到它 -
@Tseng 谢谢我会试试的。这可能是问题
标签: docker asp.net-core asp.net-core-2.1