CreateImageAsync silently fails
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 416
- PR merge metrics
- No merged PRs in 30d
Description
**What version of Docker.DotNet?:**
```
Tip
```
**Steps to reproduce the issue:**
1. Pull the microsoft/aspnet image (or any other large image).
This is the code basic snippet I used to reproduce.
m_DockerClient.Images.CreateImageAsync(new ImagesCreateParameters {
FromImage = "microsoft/aspnet",
Tag = "latest",
},
new AuthConfig(),
new Progress(),
CancellationToken.None).Wait();
2. CreateImageAsync eventually returns without any exception.
3. The image is not available.
**What actually happened?:**
Using the Docker CLI to pull the image, you can see that the pull actually fails at the end of the extraction with the following error:
failed to register layer: re-exec error: exit status 1: output: remove \\?\C:\ProgramData\Docker\windowsfilter\0706a66d9dee465807b9534864c545f20e5fb2b3a428b722902fea7648a111d3\UtilityVM\Files\Windows\servicing\Packages\Microsoft-NanoServer-Win32Compat-Package~31bf3856ad364e35~amd64~en-US~10.0.14393.0.cat: The process cannot access the file because it is being used by another process.
In the past, I have seen this problem caused by an antivirus trying to scan C:\ProgramData\Docker. This time, it was caused by Everything (https://www.voidtools.com/) trying to index this same folder.
To be clear, I'm not opening this issue to fix this problem. The situation is obviously not caused by the .Net Client. The client needs to throw when this happens though.
Full output of docker pull when the error occurs:
$ docker pull microsoft/aspnet
Using default tag: latest
latest: Pulling from microsoft/aspnet
3889bb8d808b: Already exists
8df8e568af76: Extracting [==================================================>] 1.281GB/1.281GB
2358a8661e1b: Download complete
b96ca9f924e0: Download complete
77783e7dbe33: Download complete
d53b605d237c: Download complete
eda3ee0214b3: Download complete
4522ec028340: Download complete
56bfffcc3f40: Download complete
11c167c5788b: Download complete
failed to register layer: re-exec error: exit status 1: output: remove \\?\C:\ProgramData\Docker\windowsfilter\0706a66d9dee465807b9534864c545f20e5fb2b3a428b722902fea7648a111d3\UtilityVM\Files\Windows\servicing\Packages\Microsoft-NanoServer-Win32Compat-Package~31bf3856ad364e35~amd64~en-US~10.0.14393.0.cat: The process cannot access the file because it is being used by another process.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.