How can use nexus as mirror registry for docker - Sonatype Nexus Repository / Best Practices - Sonatype Community
How can use nexus as mirror registry for docker
post by babb.sdn on Aug 17, 2022
I want use nexus as mirror registry in my docker. Actually I want when I am perform pull and image from docker hub it could also reside image in nexus repository. Now I can pull image from docker hub but a copy from the image does not reside on nexus repo.
Actually I did follow steps :
- create repository (proxy)
- add http port = 8123
- enable docker api/v1
- remote storage; select use proxy registry and use follow address: http://172.20.20.20 (this is nexus ip address) and other options are default
- finally add : http://172.20.20.20:8123 in docker registry daemon as mirror registry
Now after pull an image it just resides on docker host and cannot reside any copy from image on nexus repo. How can solve the issue?
post by mrezachalak on Nov 19, 2022
Hey John @babb.sdn,
As mentioned in dockerhub it is not possible to mirror a private registry in docker. It’s currently not possible to mirror another private registry. Only the central Hub can be mirrored.
Whenever you use Nexus as a hosted or proxy or group registry for docker it is considered as a private registry and you can use it by referring explicitly (e.g. docker pull dkr-nxs-reg/libraty/image:tag)
Reza