On Thursday, April 21, 2016, v <[email protected]> wrote:

>
>
> Am 2016-04-21 um 09:44 schrieb aleks:
>
>> 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?)
>>>
>> Unfortunately this will not delete any images at all, it will only delete
> the references to those images. You will not get any disk space back with
> this.


This is incorrect. oadm prune images does free up disk space in the
registry pod's storage.


>
> As for your second question:
> If a pod, RC or DC is using the image it will not get deleted, you can
> read the docs for more details:
>
> https://docs.openshift.com/enterprise/3.1/admin_guide/pruning_resources.html#pruning-images
>
>
>
>> 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: [email protected]
>>>> Subject: Re: Best way to delete images (local and in registry)
>>>> Date: Thu, 21 Apr 2016 08:42:50 +0200
>>>> From: [email protected]
>>>> CC: [email protected]
>>>>
>>>> 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 do
>>>>
>>>>>
>>>>>
>>>>> 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 cker rmi
>>>> >
>>>> > We get:
>>>> > REPOSITORY TAG IMAGE ID CREATED
>>>> > VIRTUAL SIZE
>>>> > <none> <none> 0fd6f6a7d8
>>>>
>>>>>
>>>>>
>>>>> 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 fb 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
>>>>
>>>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to