Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-15211

Docker Promotion API deploys instead of overwrites for the same dockerRepository:tag and leaves orphaned layers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.4.6, 5.5.1
    • Fix Version/s: 6.2.0
    • Component/s: Docker, REST API
    • Labels:
      None

      Description

      1. Add user to the docker repo with only deploy/cache permissions
      2. Docker login user test.com
      3. Docker tag alpine:3.3 test.com/alpine:test
      4. Docker push test.com/alpine:test
      5. Send the following post to the promotion api –
      curl -X POST \
      http://test.com/artifactory/api/docker/docker/v2/promote \
      -u user:password
      -H 'content-type: application/json' \
      -d '

      { "targetRepo": "docker2", "dockerRepository": "alpine" }

      '
      6. Docker tag alpine:3.4 docker.test.com/alpine:test
      7. Docker push docker.test.com/alpine:test
      8. Send the following post to the promotion api –
      curl -X POST \
      https://test.com/artifactory/api/docker/docker/v2/promote \
      -u user:password
      -H 'content-type: application/json' \
      -d '

      { "targetRepo": "docker2", "dockerRepository": "alpine" }

      '
      This will then deploy an updated manifest and add the different layers in the promotion docker repository leaving the old layers to be orphaned.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rotemk Rotem Kfir
                Reporter:
                scottm Scott Mosher
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: