Promote Docker Images

JFrog Artifactory Documentation


Artifactory supports promoting Docker images from one Docker repository in Artifactory to another.

Promoting is useful when you need to move Docker images through different acceptance and testing stages, for example, from a development repository, through the different gateways all the way to production. Instead of rebuilding the image multiple times using promotion will ensure the image you will have in your production environment is the one built by your CI server and passed all the relevant tests.

Promotion can be triggered using the following endpoint with cURL:

POST api/docker/<repoKey>/v2/promote
    "targetRepo" : "<targetRepo>",  
    "dockerRepository" : "<dockerRepository>",  
    "tag" : "<tag>", 
        "targetTag" : "<tag>",
    "copy": <true | false>





Source repository key


The target repository to move or copy


The docker repository name to promote


An optional tag name to promote, if null - the entire docker repository will be promoted. Default: latest


The new tag that the image should have after being promoted if you want to


When true, a copy of the image is promoted. When false, the image is moved to the target repository

An example for promoting the docker image jfrog/ubuntu"] with all of its tags from docker-local to docker-prod using cURL would be:

curl -i -uadmin:password -X POST "<repoKey>/v2/promote" -H "Content-Type: application/json" -d '{"targetRepo":"docker-prod","dockerRepository":"jfrog/ubuntu"}' <repoKey>/v2/promote

Notice that the above example is executed through your reverse proxy. To go directly through Artifactory, you would execute this command as follows:

curl -i -uadmin:password -X POST "http://localhost:8080/artifactory/api/docker/docker-local/v2/promote" -H "Content-Type: application/json" -d '{"targetRepo":"docker-prod","dockerRepository":"jfrog/ubuntu"}'

The following example adds retagging with a specific version of the jfrog/ubuntu image (4.9.0) being retagged to latest as it gets promoted:

curl -i -uadmin:password -X POST "" -H "Content-Type: application/json" -d '{"targetRepo":"docker-prod","dockerRepository":"jfrog/ubuntu", "tag" : "4.9.0", "targetTag" : "latest"}'