Registry Garbage Collection とは何か?
registry garbage collection は、コンテナレジストリがどの tag からも参照されなくなったレイヤーと manifest を削除するために使うプロセスです。共有レイヤーがまだ使われている可能性があるため、イメージを untag してもすぐには容量は解放されません。garbage collection が後で、参照が残っていない blob を削除します。これにより、レジストリのストレージが際限なく増えるのを防ぎます。
なぜ重要か
commit ごとにイメージを push する CI は、膨大なレイヤーストレージを急速に蓄積し、その大半は数日以内に不要になります。retention policy と garbage collection を組み合わせることで、その増加とコストを抑えられます。レイヤーは共有されているため、tag を削除しても安全で、本当に参照されていない blob だけが回収されます。
関連ガイド
What Is an OCI Artifact?An OCI artifact is any content stored in an OCI registry using the image manifest format, letting registries…
What Is an Image Layer?An image layer is one filesystem diff in a container image; layers stack to form the final filesystem and are…
What Is an Artifact Promotion Pipeline?An artifact promotion pipeline moves one immutable build through stages from test to production, promoting th…