How to set a Docker smart remote repository? [Video]

Yarden Gitta
2021-01-28 08:56

How to set a Docker remote repository pointing to another Docker repository (registry) in another Artifactory instance.

Video Transcription

Hi, I’m Yarden from Jfrog support. In this video, I will show you how to use smart remote repository for Docker images. This feature allow you to set Docker remote repository pointing to another Artifactory instance. Let’s start, here we have our main Artifactory instance, including our Docker-local repository with several images inside. We will now go over to our secondary Artifactory instance. In this case, it’s going to be Artifactory edge. We will want to add a new remote repository, so we’re gone to do that from the admin section under new remote repository. The type of the remote repository will be, of course Docker. The name will be Docker remote and the URL will pointing to our main Artifactory instance. Be aware that we need to build our URL to the Docker API in the main Artifactory instance. In this case, it’s going to be GitLabs/Artifactory/API/Docker/Docker-local. If you need more explanation about how to build this URL, you can use our documentation, here in the smart remote repository documentation.

Now we will go over to advanced tab and put our username and password of the main instance. We will click on test button to verify the connection. And we now have several unique features of smart remote repositories that we can use, like report statistics, sync properties, list remote folders items and source absence detection. If you want to read more about these features, you can read it in under smart remote repository documentation. Now let’s click save and finish and go back to our repositories list. We can notice a new remote repository called Docker remote. And one of the unique features of smart remote repository is that, we can see the list of the images from the Docker-local repository in the main Artifactory instance. Now we’re going to our local computer and we will pull a new image from the Docker remote repository. First, we need to login.

And then we can pull Docker image direct from our edge node and not from our main instance. As you can see, the pull command succeed, and now we have our images that came from our main Artifactory instance in our local machine. Because we take it from the edge node, we can find it now under the cache repository, inside the edge node. And anyone that going to use it soon from the edge node will take it direct from the edge node, and it’s not going to pull it again from the main Artifactory instance. That’s it for now, if you want more documentation about smart remote repository, I will recommend you to go to the documentation in our website. I’m hoping that you find this video helpful and thanks you for watching. If you have any questions or feedback, please feel free to edit in the comment section below. Thank you.