Affected Versions: This information pertains to Artifactory versions 5.x and 6.x

How to Replace .marker Layers with the Actual Docker Layers in a Remote Docker Repository Cache in Artifactory

AuthorFullName__c
Nihal Reddy Chinna Choudhary
articleNumber
000004485
ft:sourceType
Salesforce
FirstPublishedDate
2019-06-04T23:03:51Z
lastModifiedDate
2021-04-27
VersionNumber
4

In Artifactory, when a client tries to pull a Docker image from a remote Docker repository and the client has some or all of the layers cached locally on your disk, then Artifactory will not download these layers and mark them as .marker files in Artifactory's remote cache. So long as the remote Docker repository has external access to the Docker registry or any other upstream repository it is proxying, then the .marker layers will not cause any issues.

Having .marker layers in the docker remote remote cache can become an issue when the repository is marked offline or if the content is copied to a local Docker repository. When this happens there's no easy way to replace your .marker layers with their actual layers. At this point, the Docker pull for images with .marker layers will start to fail as .marker layers are only a reference for actual layers.

JFrog has a script available HERE (complete with a detailed README file) that can be used to fetch and cache actual Docker layers instead of .marker layers in the docker remote repository cache. Note: The script must be run on a remote Docker repository in Artifactory that has external access. This will assure that the script's API calls are able to retrieve and cache actual Docker layers via the Artifactory remote Docker repository.