本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
Devfile 组件
目前, CodeCatalyst 仅支持开发文件中的container
组件。有关更多信息,请参阅 Devfile.io 文档中的 Adding components
以下示例说明如何将启动命令添加到 devfile 中的容器。
components:
- name: test
container:
image: public.ecr.aws/amazonlinux/amazonlinux:2
command: ['sleep', 'infinity']
注意
当容器具有短效入口命令时,您必须包含 command: ['sleep', 'infinity']
以使容器保持运行。
CodeCatalyst 还支持容器组件中的以下属性:args
env
、mountSources
、和volumeMounts
。