Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.35 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.35 KB

gcrane

This tool implements a superset of the commands under cmd/crane, with additional commands that are specific to gcr.io.

Note that this relies on some implementation details of GCR that are not consistent with the registry spec, so this may break in the future.

ls

gcrane ls exposes a more complex form of ls than crane, which allows for listing tags, manifests, and sub-repositories.

cp

gcrane cp supports a -r flag that copies images recursively, which is useful for backing up images, georeplicating images, or renaming images en masse.

gc

gcrane gc will calculate images that can be garbage-collected. By default, it will print any images that do not have tags pointing to them.

This can be composed with gcrane delete to actually garbage collect them:

gcrane gc gcr.io/${PROJECT_ID}/repo | xargs -n1 gcrane delete