Search code examples
dockergitlabcicd

Docker image cannot used in GitLab : no matching manifest for linux/amd64 in the manifest list entries


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"

enter image description here


Solution

  • 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