'Docker Windows Container Access is denied issue

OS: Windows Docker Desktop version: Server: Docker Desktop 4.7.1 (77678) Expected behavior: Once i run the following command to successfully download, extract and install windows images in my system. docker pull mcr.microsoft.com/windows/servercore/iis Actual behavior: But after the command downloads the required files, it fails to extract the files downloaded. following is the error message. Using default tag: latest latest: Pulling from windows/servercore/iis 18ae6bebe21d: Extracting [==================================================>] 1.505GB/1.505GB 44a67477f452: Download complete 05fb313bfe29: Download complete 4c76990685f7: Download complete 76b228c93fc3: Download complete failed to register layer: re-exec error: exit status 1: output: Failed to safefile.OpenRelative failed in Win32: open \?\C:\ProgramData\Docker\windowsfilter\bf3bb885a2ba9a455358c0e5b6ea9e798b2ee86ecfb051c9720c96f9be1ab171\Files\ProgramData\Microsoft\Crypto\RSA\MachineKeys\f686aace6942fb7f7ceb231212eef4a4_178ff1a9-3d56-4fd5-837f-465774da8d9d: Access is denied. (0x1f) Files\ProgramData\Microsoft\Crypto\RSA\MachineKeys\f686aace6942fb7f7ceb231212eef4a4_178ff1a9-3d56-4fd5-837f-465774da8d9d Steps to reproduce: Running command to pull any of the windows image. docker pull mcr.microsoft.com/windows/servercore/iis Diagnostics id: 4EE91621-E6F2-4FCE-BF04-0CBB06362D06



Solution 1:[1]

This issue has surfaced on many other cases. The root cause seems to be (in most cases) related to Antivirus blocking the extract process to happen correctly because it incorrectly flags the operation as a virus.

Can you confirm what is your AV and if you have any real time scan happening?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vinicius Apolinario