go-pillage-registries icon indicating copy to clipboard operation
go-pillage-registries copied to clipboard

No limit on concurrent go routines leads to error

Open Chan9390 opened this issue 5 years ago • 0 comments
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.

Chan9390 avatar Feb 18 '20 18:02 Chan9390