I have a docker registry image running on a local network with the command
docker run -d -p 5000:5000 --restart=unless-stopped --name registry -v /mnt/part_sdb/registry:/var/lib/registry registry:2
but enabling the caching of images stored in Docker Hub requires one to pull the image, and push it in the local registry
Is there a way to configure the docker registry to do automatic pull-through if the image requested is not available locally while preserving the ability to push local images?
from this article:
The catch is that you will probably run the public Registry as a mirror or as a regular registry, so you will probably end up running two containers — one as a mirror, another as your local Registry (not a big deal). In artifactory you can set up as many registries as you want (local or remote), each with its own URL. Or you can “mix” them on a single URL with a virtual registry (if you think it is a good idea).