Reference: HTTPS://GITHUB.COM/VMWARE/HARBOR/BLOB/MASTER/DOCS/USER_GUIDE.MD
About the removal of the container image on the harbor, as described below:
Can be summarized briefly as:
The Harbor UI interface first removes the image, but this operation does not delete the image file stored on the disk, only the mapping of the image file manifest, and it needs to be removed by GC.
Stop Harbor First:
Docker-compose stop
With the –dry-run option, you can see the image files that will be deleted:
Docker run-it--name GC--rm--volumes-from Registry Vmware/registry:2.6.2-photon garbage-collect--dry-run/etc/registr Y/config.yml
Without the –dry-run option, perform the deletion directly:
Docker run-it--name GC--rm--volumes-from Registry Vmware/registry:2.6.2-photon garbage-collect/etc/registry/ Config.yml
Re-start Harbor:
Docker-compose start
As you can see from the above, it is cumbersome to delete a large number of images on a regular basis. It has not been found that harbor has a callable rest API to implement the deletion of the image, which is more convenient if it is available.