Docker dangling images are being created, which is leading to below error while building the image:
Step 26/42 : RUN curl.exe --version
---> Running in 26630f973213
curl 8.13.0 (Windows) libcurl/8.13.0 Schannel zlib/1.3.1 WinIDN
Release-Date: 2025-04-02
Protocols: dict file ftp ftps http https imap imaps ipfs ipns mqtt pop3 pop3s smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM SPNEGO SSL SSPI threadsafe Unicode UnixSockets
hcsshim::UnprepareLayer failed in Win32: The specified network resource or device is no longer available. (0x37)
REPOSITORY TAG IMAGE ID CREATED SIZE
azp-agent latest dc97919a4510 2 hours ago 29.5GB
<none> <none> 9db00f1f5a3d 3 days ago 4.97GB
<none> <none> 545c1b2925ff 3 days ago 5.01GB
<none> <none> d434599e8d82 4 days ago 4.97GB
<none> <none> 950bb40d7f6c 4 days ago 4.97GB
<none> <none> b777784d587f 4 days ago 4.97GB
<none> <none> de2a9b248d5c 4 days ago 11.3GB
<none> <none> bf5f35f8135b 4 days ago 11.1GB
<none> <none> 3e6b597833fb 4 days ago 11.1GB
<none> <none> 8c4136be8f04 5 days ago 6.37GB
mcr.microsoft.com/windows/servercore ltsc2019 18e77de47740 3 weeks ago 4.97GB
FYI: it is windows container:
why these images are being created? how it can be avoided, because it is occupying storage and leading above error frequently. I tried to delete manually but that is not permanent solution