How to configure Nginx for pull-through of multiple private docker registries?

I have 2 private docker registries and I tried to configure docreg-1 to pull images that don’t exist on that registry from docreg-2 by adding proxy to docreg-1 config but that didn’t work and I found out that pulling through between private docker registries are still an open issue and not possible.

Is it possible to use Nginx (maybe the caching mechanism) to pull from multiple docker registries? Nginx checks the docreg-1 and if the image doesn’t exist there tries the docreg-2.

Source: StackOverflow