javascriptdockerartifactoryjfrog-clijfrog-container-registry

JFrog replicate/copy docker images from remote repository to local repository


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.


Solution

  • 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.