Reputation: 575
I'm trying out Nexus OSS 3.0.1-01. I have a docker repository setup and I'm able to push and pull images successfully. But I need a way to delete images. For docker, deleting a component won't actually delete the actual image layers from the file system because it could be referenced by other components. So, what is the proper way to handle it?
I even deleted every single component and then ran a scheduled task to compact blob store. But that didn't seem to do much in terms of free up storage space.
My understanding is that there isn't a feature in Nexus 3 at the moment. If there is, could you please point me to some documentation on it? Otherwise, how is everyone else managing their storage space for docker repository?
Upvotes: 0
Views: 4734
Reputation: 5941
In Nexus 3.14 you go to WebUI -> Tasks -> Create -> Docker - Delete unused manifests and images
Then another job Admin - Compact blob store
to actually rm
the files from the Nexus directory.
Before that you need to delete the Nexus components (using the cleanup policy+job), as original poster did.
Upvotes: 0
Reputation: 3292
We had a user contribute this recently:
https://gist.github.com/lukewpatterson/bf9d19410094ea8bced1d4bb0523b67f
You can read about usage here: https://issues.sonatype.org/browse/NEXUS-9293
As well, a supported feature for this will be coming soon from Sonatype.
Upvotes: 1
Reputation: 7051
This is something that needs to be provided at the Docker Registry level. Currently it appears to be broken on v3.1
Did you try to go to assets and delete the layers? If that did not remove the files from the blob store, along with compact blob store, then it is a Nexus problem.
Make sure to tack this issues and confirm that this is the desired behavior for 3.2
See issues https://issues.sonatype.org/browse/NEXUS-9497 https://issues.sonatype.org/browse/NEXUS-9293
Upvotes: 0