[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Best way to delete images (local and in registry)



Hi Lorenz

Am 21-04-2016 09:01, schrieb Lorenz Vanthillo:
Thanks Aleks,

Is this deleting images on your nodes or also on your
openshift-registry?

As far as I have seen only in the registy not on the nodes.
That's the reason why we afterwards execute a

ansible -m shell -a 'docker rmi $(docker images -q)' all

And for example:

oadm prune images --keep-younger-than=60m

Will this only delete images images older than 60m which aren't used?
Or wil this also delete images which are used (maybe only on the node
but not out of the registry?)

Well due to the fact hat I'm not using such option you can try it by your own as long as you don't add ' --confirm ' to the command

Best Regards
Aleks

PS: Please keep the list on cc thanks
To: lorenz vanthillo outlook com
Subject: Re: Best way to delete images (local and in registry)
Date: Thu, 21 Apr 2016 08:42:50 +0200
From: al-openshiftusers none at
CC: users lists openshift redhat com

Hi Lorenz.

Am 20-04-2016 14:33, schrieb Lorenz Vanthillo:
> I'm searching for the best way to delete unused docker images in my
> cluster.
> Because we're rebuilding images + pushing them to the registry.
>
> When we perform
> docker images -q |xargs docker rmi
>
> We get:
> REPOSITORY TAG IMAGE ID CREATED
> VIRTUAL SIZE
> <none> <none> 0fd6f6a7d8fb 6 days ago
> 660.1 MB
> <none> <none> cdcb32f9b621 2 weeks ago
> 743.2 MB
> <none> <none> 9df362e36242 2 weeks ago
> 794 MB
> <none> <none> 67de4dbed60e 2 weeks ago
> 704 MB
> <none> <none> 999e0047a070 2 weeks ago
> 543.6 MB
>
> But oc get images gave us:

[snipp]

> Is this fine?
>
> And what's the best way to delete old images out of the registry?

Do you have tried this way?


https://docs.openshift.com/enterprise/3.1/admin_guide/pruning_resources.html#pruning-images

After wards we have run

docker rmi $(docker images -q)

on every node.

I'm not sure if the last step is still necessary in the current
version.

Best Regards
Aleks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]