简体   繁体   English

IBM Cloud:如何控制由 Code Engine 构建引起的容器镜像数量?

[英]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.

相关问题 IBM Cloud Code Engine:当应用程序不活动时如何检查日志? - IBM Cloud Code Engine: How to check logs when app not active? IBM Cloud:如何将 Db2 Warehouse 绑定到 Code Engine 应用程序? - IBM Cloud: How to bind Db2 Warehouse to Code Engine app? IBM Cloud Code Engine:如何从环境中确定应用程序 URL? - IBM Cloud Code Engine: How to determine app URL from environment? 使用端口 80 部署标准容器时,IBM Cloud Code Engine 修订失败 - IBM Cloud Code Engine revision fails when deploying standard container with port 80 IBM Cloud Code Engine:本地构建的容器镜像在部署时出现 exec 格式错误 - IBM Cloud Code Engine: Locally built container image gives exec format error when deployed 如何将自定义域添加到 IBM 云引擎 - How to add a custom domain to IBM cloud engine 在 IBM Cloud 上自动构建 Angular 6 - Automate Angular 6 builds on IBM Cloud IBM Cloud Code Engine:如何在没有 CLI 的情况下从 GitLab 源部署应用程序 - IBM Cloud Code Engine: How can I deploy an app from GitLab source without CLI IBM Cloud Code Engine:如何在 ping 订阅中传递非 JSON 数据? - IBM Cloud Code Engine: How to pass non-JSON data in ping subscription? IBM Cloud Code Engine:如何在 cron 调用的作业运行中覆盖环境变量? - IBM Cloud Code Engine: How to overwrite environment variable in cron-invoked job run?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM