Reputation: 659
I am trying to create CICD pipeline in GitLab, and find an image I thought might work for my .Net Framework project, but when I use this image, the error occurs:
WARNING: Failed to pull image with policy "always": no matching manifest for linux/amd64 in the manifest list entries (manager.go:214:0s)
ERROR: Job failed: failed to pull image "mcr.microsoft.com/dotnet/framework/aspnet" with specified policies [always]: no matching manifest for linux/amd64 in the manifest list entries (manager.go:214:0s)
my yaml:
stages:
- build
build:
stage: build
image: mcr.microsoft.com/dotnet/framework/aspnet
script:
- echo "test"
Upvotes: 0
Views: 2415
Reputation: 14118
I had the same issue, both when using WSL 2 or Hyper-V for Docker on Windows. But what helps is not to point to the manifest list of the Docker image you want, but rather the specific container.
For example, see how the 4.7.2 tags on mcr.microsoft.com point either to a "Manifest List" or a "Container Image":
For Docker, a Manifest List contains pointers to multiple images, allowing a single tag to point to different architectures. Docker will take the architecture it is running on. In our case, Linux.
I don't know of any way to tell GitLab to tell it to specify an architecture (I came across an issue in their issue tracker but can't find it anymore). So you have to point it to a Container Image, which is an image built for a specific platform.
In your case, you could do:
stages:
- build
build:
stage: build
image: mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022
script:
- echo "test"
Upvotes: 0
Reputation: 1303
A docker container shares its kernel with host.
It means, in your situation, that you're trying to run a docker image based on a windows kernel
in a linux/amd64
host, which is not possible.
As you can see in the following documentation,
this image is based on Windows Server Core
OS
https://hub.docker.com/_/microsoft-dotnet-framework-aspnet/
You may have a look to install a windows gitlab runner
:
https://docs.gitlab.com/runner/install/windows.html
Upvotes: 1