

Amazon CodeCatalyst 不再向新客戶開放。現有客戶可以繼續正常使用該服務。如需詳細資訊，請參閱[如何從 CodeCatalyst 遷移](migration.md)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

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

目前，CodeCatalyst 僅支援您 devfile 中的`container`元件。如需詳細資訊，請參閱 Devfile.io 文件中的[新增元件](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`、`mountSources`、 `env`和 `volumeMounts`。