In this article, we will discuss a basic issue while pulling docker images from one Artifactory instance via the docker remote repository which is a smart remote of another docker remote repository in another Artifactory instance.
For example, We have a remote repository in Artifactory instance A where we can pull the docker images using the configured upstream docker registry(https://registry-1.docker.io/). Now we want to push these images to the remote repository of an Artifactory instance B and now pull those images through it. In order to achieve this, we can make use of the feature smart remote repositories to pull the docker images via the Artifactory instance B.
Assume, we have configured a smart remote repository in Artifactory instance B as below with upstream URL as the URL(https://customer.jfrog.io/artifactory/test-docker-remote1/) of the remote repository of Artifactory instance A. When we click on Test button, it gives a successful response and also we will get the smart remote repository label as displayed below.
But, we get the below error while pulling the docker images via the Artifactory instance B which already exists in the Artifactory instance A even though the test connection for the smart remote repository was successful.
$ docker pull customer.jfrog.io/test-docker-smart-remote2/image-name:latest Error response from daemon: manifest for customer.jfrog.io/test-docker-smart-remote2/image-name:latest not found: manifest unknown: The named manifest is not known to the registry.
In general, the above error occurs when the requested image is not present in the Artifactory instance A. But in the current scenario, the images are there in the Artifactory instance A and not able to pull them via Artifactory instance B.
This issue occurs when the docker smart remote repository is not correctly configured. As per the smart remote repositories documentation, we need to configure the smart remote repository URL as “https://customer.jfrog.io/artifactory/api/docker/test-docker-remote1/” by adding “api/docker” in it as below.
Now, we will be able to pull the docker images that exist in the Artifactory instance A successfully via the smart remote repository of Artifactory instance B without any issues.
$ docker pull customer.jfrog.io/test-docker-smart-remote2/image-name:latest latest: Pulling from test-docker-smart-remote2/image-name Digest: sha256:f50031a49f41e493087fb95f96fdb3523bb25dcf6a3f0b07c588ad3cdbe1d0aa Status: Downloaded newer image for customer.jfrog.io/test-docker-smart-remote2/image-name:latest customer.jfrog.io/test-docker-smart-remote2/image-name:latest