docker - Docker 中 dotnet/aspnet :3. 1 的 list 条目中没有

我试图在 AzureDevOps 中构建 docker 镜像。 但是在发布管道上,我在构建 docker imamge 时收到以下错误消息:

Step 1/30 : FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
3.1: Pulling from dotnet/aspnet
no matching manifest for windows/amd64 10.0.14393 in the manifest list entries

我已经在 Docker Hub 中检查过,mcr.microsoft.com/dotnet/aspnet:3.1 是最新的可用镜像。

引用自:https://hub.docker.com/_/microsoft-dotnet-aspnet

而且我已经在本地构建了镜像,构建成功没有任何问题。 以下是我的 dockerfile:

FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80

ENV ASPNETCORE_ENVIRONMENT #{environment-profile}#

FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY ["Api/Api.csproj", "Api/"]
RUN dotnet restore "Api/Api.csproj"
COPY . .
WORKDIR "/src/Api"
RUN dotnet build "Api.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Api.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Api.dll", "--environment=#{environment-profile}#"]

有什么是我遗漏的导致它找不到图像的吗?

如果有人能提供帮助,我们将不胜感激。谢谢。

最佳答案

好的,找到问题了...Azure DevOps 中的代理作业应该更改为 Linux。我换成 Ubuntu16.04 就可以了。

关于docker - Docker 中 dotnet/aspnet :3. 1 的 list 条目中没有 windows/amd64 10.0.14393 的匹配 list ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65284616/

相关文章:

flutter - 有什么方法可以将查询参数插入 flutter web 中的命名路由?

python - 如何在 Python 的 Tkinter 中使用 .create_image

amazon-web-services - 弹性 beantalk 未记录的 venv 路径

typescript - 如何使用 Jest 和 TypeScript 正确 stub /模拟 AW

gpu - Spacy + GPU 给出错误 : GPU is not accessible. 库是

bootstrap-modal - Bootstrap v5,如何在模式中传递变量(没有 jquer

python - 将前导零添加到日期和时间字符串中的小时数

c# - 如何使用 MSIX 允许可编辑的 .Net 生成的配置文件?

docker - containerd 中的 docker volumes 是什么?

css - react/next.js 中的 * 选择器