Help Delete components Docker images repository Nexus

650 views
Skip to first unread message

Rafael Pereira Silva

unread,
May 16, 2017, 11:32:48 AM5/16/17
to Nexus Users
Hello, I have an repository with images docker. 

This repository have more images with more tags.  

root@kubs401 ~]# curl http://MYNEXUS:8124/v2/imagename/tags/list | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   521  100   521    0     0   3123      0 --:--:-- --:--:-- --:--:--  3138
{
    "name": "imagename",
    "tags": [
        "1.0.1",
        "1.0.10",
        "1.0.11",
        "1.0.12",
        "1.0.13",
        "1.0.14",
        "1.0.15",
        "1.0.16",
        "1.0.17",
        "1.0.18",
        "1.0.19",
        "1.0.2",
        "1.0.20",
        "1.0.21",
        "1.0.22",
        "1.0.23",
        "1.0.24",
        "1.0.25",
        "1.0.26",
        "1.0.27",
        "1.0.28",
        "1.0.3",
        "1.0.30",
        "1.0.31",
        "1.0.32",
        "1.0.33",
        "1.0.34",
        "1.0.36",
        "1.0.37",
        "1.0.38",
        "1.0.39",
        "1.0.4",
        "1.0.40",
        "1.0.41",
        "1.0.42",
        "1.0.43",
        "1.0.44",

I  need to remove some images because the disk space alarmed.  Some images are obsolete and need to be removed

Exist any mode for remove images with script API ? 


thanks

Jeffry Hesse

unread,
May 16, 2017, 12:21:55 PM5/16/17
to Rafael Pereira Silva, Nexus Users
Hi there,

You have a few options here!

Try taking a look at the Scheduled Task: Purge unused docker manifests and images

Docker can leave orphaned layers around, so that's a good thing to check off the bat.

If you want to delete them more explicitly, a community member put this together a while ago:


I think you can tweak this as need be to remove what you are looking for.

Let me know if it doesn't work, I'll be glad to help you out.

Jeffry

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/a98e6968-7dbb-4888-a337-d4b35a446a47%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
Reply all
Reply to author
Forward
0 new messages