[英]IBM Cloud: How to control number of container images caused by Code Engine builds?
I frequently build and deploy my app from source code using the IBM Cloud Code Engine feature .我经常使用 IBM Cloud Code Engine 功能从源代码构建和部署我的应用程序。 I noticed the container images filling up my container registry.
我注意到容器镜像填满了我的容器注册表。
How can I reduce the number of images in the container registry or limit how many are kept at hand?如何减少容器注册表中的图像数量或限制手头的图像数量?
You can set a retention policy in the IBM Cloud Container Registry .您可以在 IBM Cloud Container Registry 中设置保留策略。 This can be done by namespace.
这可以通过命名空间来完成。 If you use a namespace for a Code Engine project, you can configure the number of container images that are kept.
如果您为代码引擎项目使用命名空间,则可以配置保留的容器映像的数量。
When logged in to IBM Cloud and the container registry, run this CLI command to limit the number of container images to 5 for the namespace my-ce-apps :登录到 IBM Cloud 和容器注册表后,运行此 CLI 命令以将命名空间my-ce-apps的容器映像数量限制为 5:
ibmcloud cr retention-policy-set --images 5 my-ce-apps
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.