ARTIFACTORY: “Binary provider has no content for” when pulling from a remote docker repository

Ashraf Kherbawy
2023-02-07 14:07

Usually, the “Binary provider has no content for” error message means that your filestore is pointing to the wrong binaries path, in which Artifactory tries to look for binaries that don’t exist in that path, or simply don’t exist at all (More details regarding said error message). 

However, in the case that you are receiving this error when trying to pull from a remote docker repository, it seems to be counterintuitive, as this should occur only with local repositories. The reason why this happens with remote docker repositories is because of potential leftover manifest files that you have in your remote docker cache repository, but without their corresponding binaries (a docker manifest without its corresponding layers). 

To solve this problem, we simply need to remove the leftover manifest files, and then you should be able to execute a docker pull on your remote repository.

To do this, follow these steps:
 

1.  Locate the cache that corresponds to the remote docker repository you are trying to pull from (this should have the same name as the remote repisotry, but with a suffix of “-cache”).
2.  Inside the cache repository, locate the corresponding tag (For example, latest), that contains the manifest.json, which correlates to the SHA-1 value that you saw in the error message.
3.  Perform a Zap Cache operation on the relevant directory (That represents a docker image/tag).
 
User-added image
4.  Delete the directory.
 
5.  Repeat for any other relevant directories, if you are getting multiple binary provider errors.

You may also execute a “Delete Content” on all of the remote cache repository. Keep in mind, however, that this will delete everything in that specific cache repository, (to be used in the case that all of it is corrupted).