We recommend using Docker V2 repositories when possible (provided your Docker client is version 1.6 and above).
If you have an existing Docker V1 repository, you can migrate its content into a V2 repository using the following endpoint with cURL:
POST api/docker/<repoKey>/v1/migrate { "targetRepo" : "<targetRepo>", "dockerRepository" : "<dockerRepository>", "tag" : "<tag>" }
where:
Parameter | Description |
---|---|
<repoKey> | Source repository key (For example, docker-local as used in this page) |
<targetRepo> | The target Docker V2 repository to migrate to (For example, docker-local2 as used in this page). The repository should be created before running the |
<dockerRepository> | An optional docker repository name to migrate, if null - the entire source repository will be migrated. Default: "" |
<tag> | An optional tag name to promote, if null - the entire docker repository will be promoted. Default: "" |
An example for migrating the docker image "jfrog/ubuntu"
with all of it's tags from docker-local
to docker-local2
using cURL would be:
curl -i -uadmin:password -X POST "http://localhost:8081/artifactory/api/docker/docker-local/v1/migrate" -H "Content-Type: application/json" -d '{"targetRepo":"docker-local2","dockerRepository":"jfrog/ubuntu"}'