I encounter the following error when attempting to pull the microsoft/nanoserver image. The download is successful. This error occurs during extraction of the image.
482ab31872a2: Download complete failed to register layer: re-exec error: exit status 1: output: Failed to OpenForBackup failed in Win32: open \?\C:\ProgramData\Docker\windowsfilter\07bd46b89b4520e984bc0892bad2c955afec4b347f961ca6c31bfe5e30601806\Files\Windows\System32\drivers\etc\hosts: Access is denied. (0x1f) \?\C:\ProgramData\Docker\windowsfilter\07bd46b89b4520e984bc0892bad2c955afec4b347f961ca6c31bfe5e30601806\Files\Windows\System32\drivers\etc\hosts
This looks like a issue on the directory that the Windows image creates, but I can't figure out what permission the directory may need.
Here is my Docker version (Windows Containers):
Docker version
Client:
Version: 1.13.0-rc2**
API version: 1.25
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64
**Server:
Version: 1.13.0-rc2**
API version: 1.25
Minimum API version: 1.24
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64
Experimental: false
Here is the Docker command I am using to pull the image.
docker pull microsoft/nanoserver
Finally, here is the error message that after the image is downloaded and extracted:
This is a Windows 10 Professional workstation with build 14393 installed.
The answer to this problem was that a virus scan policy (MacAfee) was preventing access to the Windows image's host file. The policy was relaxed so that the host.dll process could have access to the directory. Once updated I had no problems pulling the nanonserver or aspnet images.
I had a similar error but
The file exists
instead ofAccess is denied
.My problem was that I had it in Windows containers mode.
Switching back to Linux fixed it for me.