Search code examples
dockerwindows-10docker-imagedocker-desktopdocker-build

Error: "Failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest" when building a Docker image


I get the error:

failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest

when building the following Dockerfile:

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8
COPY . /inetpub/wwwroot

Solution

  • The cause was simple. I had my Docker desktop running on Linux containers and the image was build from a Windows image.

    Simply switching to Windows containers solved the problem.

    The message is clueless, so I hope this save some time for others.