317

I use Docker on Windows, and when I tried to pull a PHP image with this command

$ docker pull php

I got this message:

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

How can I fix this problem?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mohammad Trabelsi
  • 3,308
  • 2
  • 10
  • 18
  • 17
    To help others, I got into this error while creating image for linux as base OS.... Reason for this error was it was set for windows containers so then I switched to Linux containers then it started working... – Abhishek Jain Jan 19 '19 at 07:13
  • 3
    Also, for posterity: I got this building a Windows container. Even though I switched to Windows, it appears to have switched back to Linux. Changing it back to Windows fixed the problem. – John MacIntyre Jun 25 '19 at 18:00

25 Answers25

376

I had this same issue on Windows 10. I bypassed it by running the Docker daemon in experimental mode:

  1. Right click Docker icon in the Windows System Tray
  2. Go to Settings
  3. Daemon
  4. Advanced
  5. Set the "experimental": true
  6. Restart Docker
Community
  • 1
  • 1
benscabbia
  • 17,592
  • 13
  • 51
  • 62
  • Besides the previous answers, I also had to remove "read only" attribute of my C:\WINDOWS\System32\drivers\etc\hosts.etc – Thiago Custodio Mar 27 '19 at 14:50
  • 9
    On Windows, you can locate the config file directly at '%programdata%\docker\config\daemon.json' and set the attributes there. – NemyaNation Aug 07 '19 at 09:59
  • 5
    This worked for me and I was just wondering why does this work? What is experimental for? – Nic Parmee Aug 22 '19 at 11:43
  • 4
    If you're running docked (daemon) from standalone binary use `--experimental` feature – Anwar Sep 01 '19 at 17:12
  • Couldn't edit via graphic interface. Had to use **Cmder as administrator** and run commands `cd C:\ProgramData\Docker\config` and `nano daemon.json` to set **experimental** value to **true**, and then restart Docker (right click on the icon near the clock at right bottom - click on the arrow to show hidden icons) – Patrick Apr 18 '20 at 11:28
  • 2
    setting "experimental": true has any security issues? do I need to revert back once operation completed? – kudlatiger May 10 '21 at 11:39
  • 2
    so what is being *experimented*? – Lei Yang Mar 23 '22 at 09:51
  • thanks this worked for me, nothing else on the net was working, come on docker. – petey m Jul 11 '22 at 20:02
319

There could be many reasons for this error. But most obvious reason for this error is using Windows Container in Linux Container Mode or vise versa.

  1. Click Docker Icon in System Tray In Context Menu
  2. Click "Switch to Window/Linux Container"
  3. Option Click Switch Button in Switch Dialog
  4. It may take little time
  5. Make Sure Docker is Running State Now

Switch Container Mode Dialog

Imran Javed
  • 11,779
  • 2
  • 16
  • 17
  • 16
    It solved my problem about "no matching manifest for windows/amd64" – winlinux Sep 03 '19 at 12:49
  • 2
    It worked for me with the issue 'no matching manifest for windows/amd64 10.0.17134 in the manifest list entries' – Amna Dec 03 '19 at 09:55
  • 3
    This answer is irrelevant for Windows Container. It only works if your container requirement is Linux Container. Please refer to @benscabbia's answer. – junnyea Jul 28 '20 at 10:57
  • Hi @junnyea, I tried to explain for both cases, so if you are on Windows Container in user, then Linux Containers Settings will not work and you may have to move to Windows Containers Settings, and vise versa. – Imran Javed Jul 29 '20 at 12:34
  • 1
    For my case, I need to run it in a Windows architecture. There is no point to switch to a Linux container. It will be more relevant if the solution given was not switching between container. – junnyea Aug 03 '20 at 06:30
  • 2
    If you can't find the system tray icon, this command will do it, on PowerShell `& $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon .` See here https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce – aviggiano Oct 07 '22 at 21:03
  • 1
    Thanks! I was trying to run a Windows container off of the `node` image, and there isn't a Windows version of the `node` image, apparently. This answer helped me further: https://stackoverflow.com/a/72583505/2552903 – tolache Oct 13 '22 at 17:59
108

You are in Windows container mode. So if you're not sure that the image you want to pull is built for the Windows architecture, you need to switch to Linux containers.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ahmad Hassan
  • 1,181
  • 1
  • 7
  • 6
  • 1
    The alternative (that I also found to be working) is in [chuck's answer](https://stackoverflow.com/questions/48066994/docker-no-matching-manifest-for-windows-amd64-in-the-manifest-list-entries/49785458#49785458) – Peter Mortensen Jul 24 '18 at 11:44
  • once it failures to switch ? it's a work around way – Tiago Medici Nov 15 '19 at 09:37
  • 1
    If you switch to Linux Containers will you then be able to host Windows applications within Docker? For example using IIS and MySQL on the same Docker instance. – webworm Feb 10 '20 at 00:03
  • @webworm since there's also MySQL for Windows, why use a Linux version when you want to mix it with IIS and not just use its Windows version? – George Birbilis Apr 20 '20 at 00:52
74

In my case it was that the Windows OS version I was on did not support the tag I was trying to pull. Utilizing an older tag allowed me to get this to work.

Specifically:

docker pull mcr.microsoft.com/windows/nanoserver:1903 errored

docker pull mcr.microsoft.com/windows/nanoserver:1803-amd64 worked

joedragons
  • 2,505
  • 21
  • 21
  • 2
    This! Microsoft changed there something compared to the old images (servercore/nanoserver). Now, you need to lookup the windows version of the system for which you're deploying to and choose the base image accordingly. – JustCoding Oct 25 '19 at 10:51
  • 1
    Nice answer! This worked for me on Windows 10 following this tutorial https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/run-your-first-container – user1299379 Feb 03 '20 at 22:35
  • It also worked for me. But does it mean that I need to have this approach when I pull every image, for eg hello-world? – Mandroid Apr 08 '20 at 06:26
  • @Mandroid I would be interested in your findings but some images seemed to work and some didn't in my case, so I'd guess it's very setup specific. e.g. if you have one Windows patch may vary from another. – joedragons Apr 21 '20 at 20:10
  • Use `winver` to make sure that the windows version of your host machine is newer or equal to the version in the image. – cowlinator Apr 28 '20 at 00:07
  • In order to pull windows server on windows 10, I had to go back to the earliest tag: win10-21h1-preview – dudeNumber4 Oct 17 '22 at 14:41
63

Version: Windows 10

Step 1: Right click Docker instance and Go to Settings
enter image description here

Step 2: Basic to Advanced and setting the "experimental": true enter image description here

Step 3: Restart Docker
enter image description here

Step 4: To install dockerfile is successful( ex: docker build -t williehao/cheers2019 . ) enter image description here

Willie Cheng
  • 7,679
  • 13
  • 55
  • 68
39

Another possible way to do this:

In system tray, right click on docker icon, then click on Switch to Linux containers.

(Docker for Windows, Community Edition, version 18.03.1)

tomab
  • 2,061
  • 5
  • 27
  • 38
23

I solved this in Windows 10 by running in admin Powershell:

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

And then:

./DockerCli.exe -SwitchDaemon
Jared Zena
  • 340
  • 3
  • 6
  • This can also be done by right clicking the Docker Desktop icon and selecting `Switch to Windows Containers` / `Switch to Linux Containers` as required. NB: You'll still get issues if the Windows image you're installing is ahead of your host version of windows (e.g. see OS Version column: https://hub.docker.com/_/microsoft-windows) – JohnLBevan Feb 11 '21 at 08:21
17

Update for Windows 10 20H2

  1. Go to Docker configurations
  2. Go to the Docker Engine tab
  3. Change the line "experimental": false to "experimental": true
  4. Restart Docker using the Apply & Restart button

enter image description here


You can also modify the configuration file manually by opening it with your favorite code editor (Visual code, Notepad++...), like this for example:

# BACKUP Your file with PowerShell
Copy-Item -Path C:\ProgramData\Docker\config\daemon.json -Destination C:\ProgramData\Docker\config\daemon.json.backup

# Open the file with Visual Code
code C:\ProgramData\Docker\config\daemon.json

Or change the string directly with Powershell

# Set Path in variable
$FILE = "C:\ProgramData\Docker\config\daemon.json"

# Replace '"experimental": false' to '"experimental": true'
(Get-Content -Path $FILE) -replace '"experimental": false','"experimental": true' | Set-Content -Path $FILE

# Check the file content
type $FILE

Output example

PS C:\WINDOWS\system32> type $FILE
{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": false,
  "experimental": true
}

After your need restart the Docker daemon

PS C:\WINDOWS\system32> Restart-Service docker

Check the status of the service

PS C:\WINDOWS\system32> Get-Service docker
Status   Name               DisplayName
------   ----               -----------
Running  docker             Docker Engine
Grzegorz Smulko
  • 2,525
  • 1
  • 29
  • 42
LinkPhoenix
  • 385
  • 3
  • 7
14

You need to pull with the Linux platform first, then you can run on Windows:

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

See blog post Docker for Windows Desktop 18.02 with Windows 10 Fall Creators Update.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
chuck
  • 315
  • 3
  • 8
9

In Docker:

  1. go to Settings
  2. go to Docker Engine
  3. change experimental to true
  4. press Apply and Restart

.

SeyedPooya Soofbaf
  • 2,654
  • 2
  • 29
  • 31
8

This looks like "docker pull" fails in windows 10 #1100

If adding --experimental does not work, consider re-installing docker for windows.

Nicolás Alarcón Rapela
  • 2,714
  • 1
  • 18
  • 29
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Adding "experimental: true" didn't work for me, so I thought I'd try switching to the Linux container before re-installing docker and it worked. – yoges nsamy Aug 16 '18 at 02:35
  • On Windows enviroment, also check if Hyper-V Virtual Machine Management service is running, then after installing docker, switch it to Linux containers mode. – Junior Mayhé Feb 09 '19 at 17:33
  • 1
    Adding `experimental` works , thanks... Why is that so ? – Angshuman Agarwal Apr 12 '20 at 15:06
  • @AngshumanAgarwal Using experimental features (https://docs.docker.com/docker-for-windows/#command-line) adds drivers (https://github.com/docker/cli/blob/master/experimental/README.md#current-experimental-features) which might be needed for using Docker for Windows. – VonC Apr 12 '20 at 15:28
5
docker run mcr.microsoft.com/windows/servercore:ltsc2016 

try the above command. what you are pulling should be compatible with the underlying windows version you are in. above will work if you are in windows server 2016.

follow this thread for more info

malat
  • 12,152
  • 13
  • 89
  • 158
  • This is true for `ltsc2019` vs `ltsc2022` as well. One of my computers (newer) could run 22, but my other computer couldn't. – daevski Mar 31 '22 at 19:37
5

Right click Docker instance Go to Settings Daemon Advanced Set the "experimental": true Restart Docker

 {
      "registry-mirrors": [],
      "insecure-registries": [],
      "debug": true,
      "experimental": true
    }
harun ugur
  • 1,718
  • 18
  • 18
5

This just happened to me after I upgraded Docker Desktop (previously configured with WSL2 integration.)

In case you ran into this after an upgrade, just FYI that I had to do the following:

Run PowerShell in Administrator (elevated) mode and execute the following commands:

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

If you don't do this, you might not be able to open up the Settings tab on Docker Desktop.

Then, you need to switch to Linux Containers in Settings (by unchecking "Use the WSL2 based engine"), then restart.

enter image description here

At this point, just run a quick test that downloads an image and runs a container off it, to see if that solves the issue:

docker run --rm -ti alpine:latest uname -a
Linux 2b08b155a042 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 Linux

From there, if you were running with WSL2 integration, simply go back to the Settings screen and undo the selection we did in step number two (which will restart docker.)

At that point, you will see all images and stopped containers you had prior to the upgrade.

luis.espinal
  • 10,331
  • 6
  • 39
  • 55
5

I have encountered this error when I started learning docker and my understanding of this scenario is below:

why you hit this issue: Because you're referring the image of Linux based and you're currently using windows base platform to run/ build docker image.

Resolution: Short answer: Either switch your current platform to Linux mode or pull the windows based image. Here is the list of possible options:

  1. Switch to Linux Containers as the error is "no matching manifest for windows/amd64"
  2. Set the docker environment "experimental": true.
  3. Pull the image specific to a platform e.g. docker pull --platform {linux/Windows} {image-name}
Rohit Tatiya
  • 361
  • 2
  • 7
4

Deprecating the ‘latest’ tag

We are deprecating the ‘latest’ tag across all our Windows base images to encourage better container practices. At the beginning of the 2019 calendar year, we will no longer publish the tag ; We’ll yank it from the available tags list.

We strongly encourage you to instead declare the specific container tag you’d like to run in production. The ‘latest’ tag is the opposite of specific; it doesn’t tell the user anything about what version the container actually is apart from the image name. You can read more about version compatibility and selecting the appropriate tag on our container docs .

https://techcommunity.microsoft.com/t5/containers/windows-server-2019-now-available/ba-p/382430#

Eltomon
  • 354
  • 3
  • 16
3

Consider the applications that you are pulling - are they Windows based? If not, you need to run a Linux container.

Without using the experimental mode, you can only use Docker in one style of container vs the other. If you activate the experimental mode as mentioned above, you can use Windows and Linux containers as required by the applications you are pulling in the compose file.

Key note: Experimental - still in development by Docker.

Connor
  • 31
  • 3
3

This may not only happen due to windows containers!

Today all Node.Js docker images are not pullable. Always check the image you are trying to pull before.

Related Github-Issue

FabianTe
  • 516
  • 4
  • 22
3

I had the same problem to run Windows IIS image using docker for Windows. Reading the Mohammad Trabelsi response above I realised that to solve my problem I needed to switch my containers (on docker) for Windows containers.

To do this:

  1. Right click Docker instance
  2. Select "Switch to Windows containers..."
Filipe Luchini
  • 351
  • 3
  • 7
3

I was getting this error in my Azure DevOps pipeline.

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

The problem was I had selected the Hosted VS2017 instead of the Hosted Ubuntu. After changing the same as follows, the build was successful.

enter image description here

Hope it helps.

Sibeesh Venu
  • 18,755
  • 12
  • 103
  • 140
2

In my case I had to update windows first, after that the problem has gone.

Legends
  • 21,202
  • 16
  • 97
  • 123
  • Yes! If your version of Windows has gone out of service, you will get this error message. Running Update will solve it! – Jason D Jan 14 '21 at 17:58
2

Make sure you aren't trying to use Linux/WSL to pull a Windows image.

Use a Powershell terminal instead.

Samuurai
  • 375
  • 2
  • 13
  • This issue could be with terminal what you are using. If you use Git bash or Linux/WSL you will get this error. – Vijay Sep 08 '22 at 10:45
1

For me, it is because of access denied to C:\ProgramData\Docker\config\daemon.json After I fixed it now it works. You can try to switch to Linux containers and switch back. If there is no problem with the switching, then it works with the access permission.

GoYun.Info
  • 1,356
  • 12
  • 12
1

On Windows you must edit the file daemon.json or windows-daemon-options.json, the default location of the configuration file on Windows is %programdata%\docker\config\daemon.json or %programdata%\docker\resources\windows-daemon-options.json

enter image description here enter image description here

enter image description here

enter image description here

The optional field features on the json file, allows users to enable or disable specific daemon features. Example: {"features":{"buildkit": true}} enables buildkit as the default docker image builder.

Tiago Medici
  • 1,944
  • 22
  • 22
  • on windows server 2019 run this: $configfile =@" { "experimental":true } "@ $configfile|Out-File -FilePath c:\Programdata\docker\config\daemon.json -Encoding ascii -Force restart-Service docker – Nicolae Lupei Dec 15 '20 at 10:33
0

The reason it is showing this message because it is unable to find Linux containers as running. So, make sure you switch from windows to linux containers before running it.

Udit Gandhi
  • 337
  • 4
  • 6