迁移到 .NET 6.0 后的 Docker 镜像版本。

huangapple go评论68阅读模式
英文:

Docker image version after migration to .net 6.0

问题

我刚刚将我的应用程序从.NET Core 3.1迁移到.NET 6.0,只剩下最后一步了。我有一个名为Dockerfile.publish的文件,如果我理解正确的话,我需要将运行时版本更改为与.NET 6.0匹配。

对于.NET Core 3.1,使用的是:

FROM mcr.microsoft.com/dotnet/runtime:3.1-bionic

所以,我的问题是,在.NET 6.0中是否有与runtime:3.1-bionic相当的内容,因为我在文档中找不到任何相关信息。也许只需要简单地使用FROM mcr.microsoft.com/dotnet/runtime:6.0就足够了?我在文档中找不到相关信息。

英文:

I have just migrated my app form .net core 3.1 to .net 6.0 and only one step left. I have file Dockerfile.publish and there if I understand correctly I need to change runetime version to match .net 6.0.

For .net core 3.1 there is:

FROM mcr.microsoft.com/dotnet/runtime:3.1-bionic

So, here is my question is it any equivalent for runtime:3.1-bionic in .net 6.0 because I can't find anything in documentation. Maybe just simple FROM mcr.microsoft.com/dotnet/runtime:6.0 is enough? I can't find anything about that in documentation.

答案1

得分: 1

Bionic指的是Ubuntu 18.04,它已经不再受支持。对于.NET 6,可以使用Ubuntu 20.04(6.0-focal)和Ubuntu 22.04(6.0-jammy)的标签。你可以在https://hub.docker.com/_/microsoft-dotnet-runtime/找到所有当前支持的.NET运行时镜像的标签。

英文:

Bionic refers to Ubuntu 18.04, which is not supported anymore. For .NET 6, tags for both Ubuntu 20.04 (6.0-focal) and Ubuntu 22.04 (6.0-jammy) are available. You can find all currently supported tags for the .NET runtime images at https://hub.docker.com/_/microsoft-dotnet-runtime/.

huangapple
  • 本文由 发表于 2023年8月8日 23:04:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/76860833.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定