[英]no matching manifest for windows/amd64 10.0.14393 in the manifest list entries for dotnet/aspnet:3.1 in Docker
I was trying to build the docker image in AzureDevOps.我试图在 AzureDevOps 中构建 docker 映像。 However on release pipeline I receive below error message while building the docker imamge:
但是在发布管道上,我在构建 docker 图像时收到以下错误消息:
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
I have checked in Docker Hub, that mcr.microsoft.com/dotnet/aspnet:3.1
is the latest available image.我检查了 Docker Hub,
mcr.microsoft.com/dotnet/aspnet:3.1
aspnet:3.1 是最新的可用图像。
Reference from: https://hub.docker.com/_/microsoft-dotnet-aspnet参考自: https://hub.docker.com/_/microsoft-dotnet-aspnet
And I have build the image in local, it was build succeeded without any problem.而且我已经在本地构建了图像,它构建成功没有任何问题。 Below are my dockerfile:
下面是我的 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}#"]
Is there anything that I missed to cause that it couldn't found the image?有什么我错过的东西导致它找不到图像吗?
Appreciate if anyone could help.感谢是否有人可以提供帮助。 Thank you.
谢谢你。
Ok found the problem... The agent job in Azure DevOps should be changed to Linux.好的,发现问题... Azure DevOps 中的代理作业应更改为 Linux。 I changed to Ubuntu16.04 then it works.
我改成 Ubuntu16.04 然后就可以了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.