Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-13200

Deleting docker image leaves dangling image of same ID

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 3.4.0
    • Fix Version/s: None
    • Component/s: Docker
    • Labels:
    • Environment:
      (MacOSX)
    • Story Points:
      2

      Description

      When I have 2 images with different tags but delete one using curl, it removes the sha file and the latest image but leaves the other image there. This was intentional after NEXUS-12711 but further work could be done so delete both images.
      The workaround is run the delete again and it will remove the second image.

      Steps to repro:
      1) docker pull hello-world
      2) docker tag hello-world <hosted:port>/hello-world
      3) docker push <hosted:port>/hello-world
      4) docker tag hello-world <hosted:port>/hello-world:second
      5) docker push <hosted:port>/hello-world:second
      6) curl -v -u 'admin:admin123' -H 'Accept:application/vnd.docker.distribution.manifest.v2+json' https://<hosted:port>/v2/hello-world/manifests/latest -k
      7) curl -v -X DELETE -u 'admin:admin123' https://<hosted:port>/v2/hello-world/manifests/sha256:<Docker-Content-Digest> -k
      8) curl -u 'admin:admin123' https://<hosted:port>/v2/hello-world/tags/list -k
      shows "second". UI also shows image and manifest for second.
      WEIRD9) curl -v -u 'admin:admin123' -H 'Accept:application/vnd.docker.distribution.manifest.v2+json' https://<hosted:port>/v2/hello-world/manifests/second -k
      shows the <Docker-Content-Digest> same as latest. So seems an associated file is now missing (on push, both the manifest and sha file are created).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jtom Joe Tom
              Last Updated By:
              Peter Lynch
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title