0

We have this use case where we are pulling the remote Artifactory images from DockerHub, GCR and Jfrog artifactory and caching them into our Jfrog Repository. What we need right now is a way to replicate those docker images in JFrog Remote or Virtual Repository into JFrog local docker repository under a specific path.

We want to achieve that using HTTP only, without using any system command. Pull/Push replication doesn’t seem to solve my problem.

As a fact I know we can do that by pulling images using docker pull and updating the docker tag by pointing it to local repository path, but as I’ve mentioned, I need to do this in HTTP way.

Any help from JFrog community would be appreciated.

Gaurav Sharma
  • 1,983
  • 18
  • 18
  • The solution for me was JFrog always creates a copy in the Local Repository when we configure the pull via Remote or Virtual Repository. By making use of this, I was able to fix my problem. Hoping it helps someone looking for a solution. – Gaurav Sharma Mar 28 '22 at 15:55

1 Answers1

1

Repository Replication is only supported between two different Artifactory instances. If the remote registry you are trying to mirror is also an Artifactory instance, then Artifactory would automatically recognize it as such and give you the options to set up Pull Replication.

The best option would be to write a script that pulls every available image from a list of desired images, and then caches them to a local cache of the remote. You can automate copying from cache to local repository using a user plugin such as createCopy.

AngelloMaggio
  • 504
  • 5
  • 16
  • Thanks a lot. The cache repository is something I was looking for. Copy Artifact API was not working on remote repository but it worked on its cache. So I was able to move remote repository cached docker image to my local repository. Also, I do have JFrog cloud. How to upload my groovy scripts? – Gaurav Sharma Aug 10 '20 at 05:10
  • I believe that's something to reach out to them about :) – AngelloMaggio Aug 25 '20 at 17:08