

亚马逊 CodeCatalyst 不再向新买家开放。现有客户可以继续正常使用该服务。有关更多信息，请参阅 [如何从中迁移 CodeCatalyst](migration.md)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Devfile 组件
<a name="devenvironment-devfile-components"></a>

目前， CodeCatalyst 仅支持开发文件中的`container`组件。有关更多信息，请参阅 Devfile.io 文档中的 [Adding components](https://devfile.io/docs/2.0.0/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`。