Open debug-richard opened 10 months ago
This still happens with 4.30.0.
But I found this 10 year old tool https://github.com/moby/docker-ci-zap that allows you to remove the leftovers from the file system. But you usually need to uninstall docker + reboot to close all filehandles before execution.
But the fact that this tool has 50 lines of code and the function still hasn't made it into Docker is a bit depressing.
Description
I am working with custom Gitlab CI runners which use Docker Windows containers for testing.
All hosts use Windows 11 with Docker Desktop installed.
These hosts launch several hundred containers per day with multiple base images, each comprising ~25 GB with ~40 layers. Base image is always mcr.microsoft.com/windows:ltsc2019 .
As with our Linux runners, the hosts clean up all images every night to keep the system clean with this command:
system prune --all --force --volumes
Unfortunately, pulling on Windows hosts after cleanup fails every ~2 weeks with the following error message:
failed to register layer: re-exec error: exit status 1: output: link \\?\C:\ProgramData\Docker\windowsfilter\f62f5682281131a4297e1daddc01740bf52e73ecd5bce2b68d2a19c758696b2d\Files\Windows\System32\DriverStore\en-US\c_securitydevices.inf_loc \\?\C:\ProgramData\Docker\windowsfilter\bd5efe6d686ac304121708322fae29028b723ac336711494139468fd00e00a81\Files\Windows\WinSxS\amd64_c_securitydevices.inf.resources_31bf3856ad364e35_10.0.17763.1_en-us_8ae2ad4f85596716\c_securitydevices.inf_loc: An attempt was made to create more links on a file than the file system supports.
After this error the Docker installation is stuck.
A look in
C:\ProgramData\Docker\windowsfilter
shows the problem: There are dozens of directories, each of which is up to several GB in size, so that the total amounts to 100-80 GB. There is still ~700GB of free space on the NTFS file system.They are apparently not deleted by Docker, not even by docker system prune, which explains the error message. The directories are so write-protected that they cannot be deleted even with admin rights and Powershell scripts.
Even uninstalling Docker does not delete the folders.
However, the de/reinstallation seems to be the only way to get Docker up and running again (for two weeks).
Reproduce
docker system prune --all --force --volumes docker pull X
Expected behavior
docker system prune --all --force --volumes
should cleanupC:\ProgramData\Docker\windowsfilter
docker version
docker info
Diagnostics ID
0
Additional Info
No response