通常,我将以下图像用于 core 3.1,它工作正常.
FROM mcr.microsoft/dotnet/core/aspnet:3.1-buster-slim AS基础从mcr.microsoft/dotnet/core/sdk:3.1-buster AS构建出于实验原因,我启动了一个新的 5项目,并使用以下代码创建了 dockerfile
FROM mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim AS基础从mcr.microsoft/dotnet/core/sdk:5.0-buster AS构建,并出现以下问题:
=>错误[内部]加载mcr.microsoft/dotnet/core/sdk:5.0-buster 0.2s的元数据=>错误[内部]加载mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim 0.2s的元数据=>从mcr.microsoft/dotnet/core/sdk:5.0-buster 0.0s取消[内部版本1/7]=>=>解析mcr.microsoft/dotnet/core/sdk:5.0-buster 0.0s=>[内部]负载构建上下文0.0s=>来自mcr.microsoft/dotnet/core/aspnet的错误[base 1/2]:5.0-buster-slim 0.0s=>=>解析mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim 解决方案当我阅读
图片说明:
mcr.microsoft/dotnet/runtime:5.0 | .NET 5多体系结构:支持Linux和Windows Nano Server,具体取决于Docker主机. |
mcr.microsoft/dotnet/aspnet:5.0 | ASP.NET Core 5.0多体系结构:支持Linux和Windows Nano Server,具体取决于Docker主机.aspnetcore映像对ASP.NET Core进行了一些优化. |
mcr.microsoft/dotnet/aspnet:5.0-buster-slim | .NET 5仅在Linux Debian发行版上运行时 |
mcr.microsoft/dotnet/aspnet:5.0-nanoserver-1809 | .NET 5仅运行时在Windows Nano Server(Windows Server版本1809)上 |
图像描述参考.
Typically I use following images for core 3.1 and it works fine.
FROM mcr.microsoft/dotnet/core/aspnet:3.1-buster-slim AS base FROM mcr.microsoft/dotnet/core/sdk:3.1-buster AS buildI have for experimental reason started a new 5 project and created dockerfile with following
FROM mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim AS base FROM mcr.microsoft/dotnet/core/sdk:5.0-buster AS buildand have following issue:
=> ERROR [internal] load metadata for mcr.microsoft/dotnet/core/sdk:5.0-buster 0.2s => ERROR [internal] load metadata for mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim 0.2s => CANCELED [build 1/7] FROM mcr.microsoft/dotnet/core/sdk:5.0-buster 0.0s => => resolve mcr.microsoft/dotnet/core/sdk:5.0-buster 0.0s => [internal] load build context 0.0s => ERROR [base 1/2] FROM mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim 0.0s => => resolve mcr.microsoft/dotnet/core/aspnet:5.0-buster-slim解决方案
As I read here, it is changed to:
FROM mcr.microsoft/dotnet/aspnet:5.0-buster-slim AS base FROM mcr.microsoft/dotnet/sdk:5.0-buster-slim AS buildIt is also mentioned on the docker hub with more info:
As part of the .NET 5.0 release, all .NET Docker images (including .NET Core 2.1 and 3.1) have transitioned to a new set of Docker repositories described below. Updates will continue to be made to supported tags in the old repository locations for backwards compatibility. Please update any repository references to these new names. For more information see the .NET 5.0 repository rename announcement.
EDIT: Image descriptions:
mcr.microsoft/dotnet/runtime:5.0 | .NET 5 multi-architecture: Supports Linux and Windows Nano Server depending on the Docker host. |
mcr.microsoft/dotnet/aspnet:5.0 | ASP.NET Core 5.0 multi-architecture: Supports Linux and Windows Nano Server depending on the Docker host. The aspnetcore image has a few optimizations for ASP.NET Core. |
mcr.microsoft/dotnet/aspnet:5.0-buster-slim | .NET 5 runtime-only on Linux Debian distro |
mcr.microsoft/dotnet/aspnet:5.0-nanoserver-1809 | .NET 5 runtime-only on Windows Nano Server (Windows Server version 1809) |
Image description reference.
更多推荐
.NET 5的Docker映像
发布评论