ARTIFACTORY: What is the “_uploads” folder under Artifactory Docker repositories?

AuthorFullName__c
Fadi Rouhana
articleNumber
000005322
FirstPublishedDate
2022-06-28T14:23:43Z
lastModifiedDate
2025-05-15

ARTIFACTORY: What is the “_uploads” folder under Artifactory Docker repositories?


When pushing a Docker image to Artifactory, a “_uploads” folder is created under the Docker repository as seen below:

User-added image

To better understand the usage of the “_uploads” folder, we need to understand how the Docker Push API works. Docker pushes images in two parts: first it uploads the layers, then, once all the layers are uploaded, it uploads the signed manifest, which references the layers to pull them together into a cohesive image.

What is the “_uploads” directory used for?

Due to the way the Docker client works, we don't know to which path the layers should be deployed, so the layers are deployed to the “_uploads” directory. Once the Docker client pushes the manifest.json file, we can determine the layers' path and copy the uploaded layers to that location from the "_uploads" directory. Eventually, the layers will be deleted from the "_uploads" directory by a daily clean-up job that deletes the layers from the "_uploads" directories.

Cleanup of the “_uploads” directory

We can set/modify the following system properties in

$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties

file in order to configure the cleanup job the is responsible to clean up the “_uploads” directory:

  • artifactory.docker.cleanup.maxAgeMillis – this property determines the age of files to be deleted by the job.
  • artifactory.docker.cleanup.uploadsTmpFolderJobSecs – this property determines how frequently this job should run.


For instance, to set the maximum age of a layer to 24 hours and to schedule the job to run once per day, add the sample configuration below to the

$JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties

file and restart Artifactory for the chances to take effect:
 

artifactory.docker.cleanup.maxAgeMillis=86400000
artifactory.docker.cleanup.uploadsTmpFolderJobSecs=86400


Note: Changing the frequency may affect the performance of Artifactory based on the job's frequency, the number of local repositories, and the volume of files we need to delete.

Important: When configuring the cleanup job, make sure to take into account situations where a slow client uploads a large Docker image. In these cases, the delta between the deployment of the first layer to the upload of the manifest file must not be greater than the “artifactory.docker.cleanup.maxAgeMillis” property, otherwise, the layer might be removed and the push will fail consequently.