AWS Image Builder 中的容器配方是否有任何 CDK 或 CloudFormation 支持?
Is there any CDK or CloudFormation support for Container Recipes in AWS Image Builder?
我在 CDK or CloudFormation 文档中没有看到任何关于 AWS Image Builder 容器配方的资源。
我能找到的最接近的东西是对图像配方的支持,它不用于创建容器图像,仅用于 AMI。我真的需要将此资源添加到我的 CF 堆栈以创建一个图像(如在容器图像中)管道,将生成的图像推送到 ECR 中......我只能手动完成......到目前为止。
我使用的是 TS CDK 库,这与 atm 无关。
在cloudformation中有AWS::ImageBuilder::ContainerRecipe:
Creates a new container recipe. Container recipes define how images are configured, tested, and assessed.
文档还提供了 example 如何创建容器配方。因此,您的问题不清楚,如果您希望在 CloudFormation 中创建不同类型的容器副本?
来自文档的示例:
Resources:
ContainerRecipeAllParameters:
Type: 'AWS::ImageBuilder::ContainerRecipe'
Properties:
Name: 'container-recipe-name'
Version: '1.0.0'
ParentImage: !Ref ParentImage
Description: 'description'
ContainerType: 'DOCKER'
Components:
- ComponentArn: !Ref ComponentArn
- ComponentArn: !Ref AnotherComponentArn
TargetRepository:
Service: 'ECR'
RepositoryName: !Ref RepositoryName
DockerfileTemplateData: |
FROM {{{ imagebuilder:parentImage }}}
{{{ imagebuilder:environments }}}
{{{ imagebuilder:components }}}
WorkingDirectory: "dummy-working-directory"
KmsKeyId: !Ref KmsKeyId
Tags:
Usage: 'Documentation'
我在 CDK or CloudFormation 文档中没有看到任何关于 AWS Image Builder 容器配方的资源。
我能找到的最接近的东西是对图像配方的支持,它不用于创建容器图像,仅用于 AMI。我真的需要将此资源添加到我的 CF 堆栈以创建一个图像(如在容器图像中)管道,将生成的图像推送到 ECR 中......我只能手动完成......到目前为止。
我使用的是 TS CDK 库,这与 atm 无关。
在cloudformation中有AWS::ImageBuilder::ContainerRecipe:
Creates a new container recipe. Container recipes define how images are configured, tested, and assessed.
文档还提供了 example 如何创建容器配方。因此,您的问题不清楚,如果您希望在 CloudFormation 中创建不同类型的容器副本?
来自文档的示例:
Resources:
ContainerRecipeAllParameters:
Type: 'AWS::ImageBuilder::ContainerRecipe'
Properties:
Name: 'container-recipe-name'
Version: '1.0.0'
ParentImage: !Ref ParentImage
Description: 'description'
ContainerType: 'DOCKER'
Components:
- ComponentArn: !Ref ComponentArn
- ComponentArn: !Ref AnotherComponentArn
TargetRepository:
Service: 'ECR'
RepositoryName: !Ref RepositoryName
DockerfileTemplateData: |
FROM {{{ imagebuilder:parentImage }}}
{{{ imagebuilder:environments }}}
{{{ imagebuilder:components }}}
WorkingDirectory: "dummy-working-directory"
KmsKeyId: !Ref KmsKeyId
Tags:
Usage: 'Documentation'