Nexus 3 Compact blob 存储任务不会物理删除图像

Nexus 3 Compact blob store task does not remove images physically

我们正在删除旧的 docker 图片,保留最后 10 张。我们尝试了 Compact blob store task 来物理删除它们,但是在 administration/Repository 设置中,Blob store 在删除图像后仍然显示相同的大小。

这是紧凑的 blob 存储日志:

2018-06-28 14:18:40,709+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.compact.internal.CompactBlobStoreTask - Task information:
2018-06-28 14:18:40,712+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.compact.internal.CompactBlobStoreTask -  ID: 2bf9a574-f3e6-4f8e-8351-d98e4abc5103
2018-06-28 14:18:40,712+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.compact.internal.CompactBlobStoreTask -  Type: blobstore.compact
2018-06-28 14:18:40,712+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.compact.internal.CompactBlobStoreTask -  Name: cbs
2018-06-28 14:18:40,712+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.compact.internal.CompactBlobStoreTask -  Description: Compacting default blob store
2018-06-28 14:18:40,713+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.file.FileBlobStore - Deletions index file rebuild not required
2018-06-28 14:18:40,713+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.file.FileBlobStore - Begin deleted blobs processing
2018-06-28 14:18:41,551+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.file.FileBlobStore - Elapsed time: 837.6 ms, processed: 45/45
2018-06-28 14:18:41,551+0200 INFO  [quartz-6-thread-20]  *SYSTEM org.sonatype.nexus.blobstore.compact.internal.CompactBlobStoreTask - Task complete

Docker 图层可以在许多不同的图像之间共享,因此当您删除图像时,与图像关联的图层不会自动删除。首先 运行 一个 "docker - delete unused manifests and images" 任务,然后再次尝试 运行 压缩 blobstore。