Reputation: 1286
I was trying to build the docker image in AzureDevOps. However on release pipeline I receive below error message while building the 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
I have checked in Docker Hub, that mcr.microsoft.com/dotnet/aspnet:3.1
is the latest available image.
Reference from: 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:
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.
Upvotes: 3
Views: 2210
Reputation: 1286
Ok found the problem... The agent job in Azure DevOps should be changed to Linux. I changed to Ubuntu16.04 then it works.
Upvotes: 3