如何从Google集装箱注册表中清理容器图像? [英] How can I cleanly remove a container image from the Google Container Registry?

查看:194
本文介绍了如何从Google集装箱注册表中清理容器图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 gcloud docker push 将容器图像推送到Google容器注册表。两个问题:

I have pushed container images using gcloud docker push to the Google Container Registry. Two questions:

如何从注册表中清除已压缩的容器图像? (我知道我可以删除一个标签到一个图像,使它不再可用。)

How do I cleanly remove a pushed container image from the registry? (I know I can remove a tag to an image and make it not accessible anymore.)

有一堆Docker图层带来它。我想删除所有未使用的图层删除图像。

There are a bunch of Docker layers that an image brings with it. I want to remove all the unused layers with an image deletion.

推荐答案

更新:从UI中直接删除单个容器图像。

UPDATE: You can now delete individual container images straight from the UI.


  1. 转到

  2. 选择一个或多个标签,然后单击删除按钮。

截至2015年11月目前无法从注册表中清除单个容器图像。现在呢,基本上是全无的。 GCR团队正在努力工作!

As of Nov 2015: There is no way to currently delete a single container image from the registry cleanly. Right now, it is basically all or nothing. The GCR team is working on this!

原始答案:我无法想像删除单个图片的简单方法。您可以通过使用 gsutil rb gs://artifacts.< PROJECT-ID> .appspot.com 删除云存储桶来删除所有图像。您还可以使用存储浏览器并尝试删除单个零件( https://控制台)。 developers.google.com/storage/browser/artifacts ..appspot.com),但您必须知道每层的Docker散列!

Original Answer: I can't think of an easy way to delete individual images. You can delete ALL of the images by deleting the Cloud Storage bucket with gsutil rb gs://artifacts.<PROJECT-ID>.appspot.com. You can also use the storage browser and try to delete individual parts (https://console.developers.google.com/storage/browser/artifacts..appspot.com) but you would have to know the Docker hashes for each layer!

这篇关于如何从Google集装箱注册表中清理容器图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆