go-pillage-registries
go-pillage-registries copied to clipboard
No limit on concurrent go routines leads to error
trafficstars
Checking the source code pillage.go I found the following flow:
EnumRegistries() --> EnumRegistry() --> EnumRepository() --> EnumImage()
Each stage executes asynchronously and crane gets called once when enumerating registry, repository and image.
So if I have 1 registry with 2 docker containers with 3 tags each, the code will have invoked crane 6 times. When dealing with huge registries, crane is invoked multiple times. Since crane uses docker credential file configured on the system its running, it returns the error open /Users/username/.docker/config.json: too many open files when invoked multiple times.