我在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

我该如何解决这个问题?


当前回答

您已进入Windows容器模式。因此,如果您不确定想要提取的映像是为Windows体系结构构建的,那么您需要切换到Linux容器。

其他回答

我在Windows 10中通过运行管理Powershell解决了这个问题:

cd "C:\Program Files\Docker\Docker"

然后:

./DockerCli.exe -SwitchDaemon

看起来在windows 10 #1100中“docker pull”失败了

如果添加——experimental不起作用,考虑重新安装docker for windows。

对我来说,这是因为C:\ProgramData\Docker\config\daemon.json被拒绝访问 我把它修好了,现在可以用了。 您可以尝试切换到Linux容器,然后再切换回来。如果切换没有问题,那么它与访问权限一起工作。

我有同样的问题运行Windows IIS映像使用docker for Windows。读了上面Mohammad Trabelsi的回复,我意识到要解决我的问题,我需要把我的容器(在docker上)切换到Windows容器。

这样做:

右击Docker实例 选择“切换到Windows容器…”

版本:Windows 10

步骤1:右键单击Docker实例并进入设置

步骤2:基本到高级,并设置“实验”:true

步骤3:重启Docker

步骤4:安装dockerfile成功(例如:docker build -t williehao/cheers2019)