我在Windows上使用Docker,当我试图用这个命令拉一个PHP图像时

$ docker pull php

我收到了这样的信息:

Using default tag: latest
latest: Pulling from library/php no matching manifest for windows/amd64 
        in the manifest list entries

我该如何解决这个问题?


当前回答

我在Azure DevOps管道中得到了这个错误。

Step 1/7 : FROM nginx:alpine
alpine: Pulling from library/nginx
no matching manifest for windows/amd64 10.0.14393 in the manifest list entries
##[error]C:\Program Files\Docker\docker.exe failed with return code: 1
##[section]Finishing: Build an image

问题是我选择了托管的VS2017而不是托管的Ubuntu。在进行如下更改后,构建成功。

希望能有所帮助。

其他回答

我在Windows 10上也遇到了同样的问题。我通过在实验模式下运行Docker守护进程来绕过它:

右键单击Windows系统托盘中的Docker图标 进入设置 守护进程 先进的 设置“experimental”:true 重启码头工人

我在Azure DevOps管道中得到了这个错误。

Step 1/7 : FROM nginx:alpine
alpine: Pulling from library/nginx
no matching manifest for windows/amd64 10.0.14393 in the manifest list entries
##[error]C:\Program Files\Docker\docker.exe failed with return code: 1
##[section]Finishing: Build an image

问题是我选择了托管的VS2017而不是托管的Ubuntu。在进行如下更改后,构建成功。

希望能有所帮助。

你需要先使用Linux平台,然后才能在Windows上运行:

docker pull --platform linux php
docker run -it php

参见博文Docker for Windows Desktop 18.02 with Windows 10 Fall Creators Update。

右击Docker实例 进入设置 守护进程 先进的 设置“experimental”:true 重启码头工人

 {
      "registry-mirrors": [],
      "insecure-registries": [],
      "debug": true,
      "experimental": true
    }

另一种可能的方法是:

在系统托盘中,右键单击docker图标,然后单击切换到Linux容器。

(Docker for Windows, Community Edition, version 18.03.1)