【问题标题】:Is there any CDK or CloudFormation support for Container Recipes in AWS Image Builder?AWS Image Builder 中的容器配方是否有任何 CDK 或 CloudFormation 支持?
【发布时间】:2021-02-09 10:00:00
【问题描述】:

我在 CDKCloudFormation 文档中没有看到任何有关 AWS Image Builder 容器配方的资源。

我能找到的最接近的是对 Image Recipes 的支持,它不用于创建容器映像,仅用于创建 AMI。我真的需要将此资源添加到我的 CF 堆栈中以创建一个图像(如在容器图像中)管道,该管道将生成的图像推送到 ECR ......我可以手动执行此操作,仅......到目前为止。

我正在使用 TS CDK 库,这并不重要。

【问题讨论】:

    标签: amazon-web-services aws-cdk


    【解决方案1】:

    在cloudformation中有AWS::ImageBuilder::ContainerRecipe

    创建一个新容器配方。容器配方定义了图像的配置、测试和评估方式。

    文档还提供了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'
    

    【讨论】:

    • idk 如果 AWS::ImageBuilder::ContainerRecipe 资源是新的或者我只是没有看到它,但我发誓在我发布这个时它不是一个选项......或者也许这是大声笑... idk
    • @aphexlog 不确定它是否是新的。可能CFN资源有相似的名字,所以可能只是一个简单的情况,忽略它。
    猜你喜欢
    • 2018-04-12
    • 1970-01-01
    • 1970-01-01
    • 2020-12-19
    • 1970-01-01
    • 2021-12-12
    • 1970-01-01
    • 1970-01-01
    • 2019-09-15
    相关资源
    最近更新 更多