aph*_*log 4 amazon-web-services aws-cdk
我在CDK或CloudFormation文档中没有看到任何有关 AWS Image Builder 容器配方的资源。
我能找到的最接近的是对图像配方的支持,不用于创建容器图像,仅用于创建 AMI。我确实需要将此资源添加到我的 CF 堆栈中,以创建一个图像(如在容器图像中)管道,将生成的图像推送到 ECR 中...到目前为止,我只能手动执行此操作。
我正在使用 TS CDK 库,但这并不重要。
在cloudformation中有AWS::ImageBuilder::ContainerRecipe:
创建一个新的容器配方。容器配方定义了镜像的配置、测试和评估方式。
该文档还提供了如何创建容器配方的示例。因此,您的问题不清楚,您是否希望在 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'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
475 次 |
| 最近记录: |