Skip to content
v2.274.0

Experimental

@aws-cdk/aws-imagebuilder-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ContainerRecipeProps Struct ​

Properties for creating a Container Recipe resource.

Example ​

ts
const containerRecipe = new imagebuilder.ContainerRecipe(this, 'MyContainerRecipe', {
  baseImage: imagebuilder.BaseContainerImage.fromDockerHub('amazonlinux', 'latest'),
  targetRepository: imagebuilder.Repository.fromEcr(
    ecr.Repository.fromRepositoryName(this, 'Repository', 'my-container-repo')
  )
});

const containerPipeline = new imagebuilder.ImagePipeline(this, 'MyContainerPipeline', {
  recipe: exampleContainerRecipe
});

Properties ​

The base image for customizations specified in the container recipe.
componentsoptionalComponentConfiguration[]componentsoptionaltyping.List[ComponentConfiguration]componentsoptionalList<ComponentConfiguration>ComponentsoptionalComponentConfiguration[]Componentsoptional*[]ComponentConfiguration= None#
The list of component configurations to apply in the image build.
containerRecipeNameoptionalstringcontainer_recipe_nameoptionalstrcontainerRecipeNameoptionalStringContainerRecipeNameoptionalstringContainerRecipeNameoptional*string#
The name of the container recipe.

Default: a name is generated

containerRecipeVersionoptionalstringcontainer_recipe_versionoptionalstrcontainerRecipeVersionoptionalStringContainerRecipeVersionoptionalstringContainerRecipeVersionoptional*string= 1.0.x#
The version of the container recipe.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= None#
The description of the container recipe.
dockerfileoptionalDockerfileDatadockerfileoptionalDockerfileDatadockerfileoptionalDockerfileDataDockerfileoptionalDockerfileDataDockerfileoptionalDockerfileData#
The dockerfile template used to build the container image.

Default: a standard dockerfile template will be generated to pull the base image, perform environment setup, and run all components in the recipe

instanceBlockDevicesoptionalBlockDevice[]instance_block_devicesoptionaltyping.List[BlockDevice]instanceBlockDevicesoptionalList<BlockDevice>InstanceBlockDevicesoptionalBlockDevice[]InstanceBlockDevicesoptional*[]BlockDevice#
The block devices to attach to the instance used for building, testing, and distributing the container image.

Default: the block devices of the instance image will be used

instanceImageoptionalContainerInstanceImageinstance_imageoptionalContainerInstanceImageinstanceImageoptionalContainerInstanceImageInstanceImageoptionalContainerInstanceImageInstanceImageoptionalContainerInstanceImage#
The image to use to launch the instance used for building, testing, and distributing the container image.

Default: Image Builder will use the appropriate ECS-optimized AMI

kmsKeyoptionalIKeykms_keyoptionalIKeykmsKeyoptionalIKeyKmsKeyoptionalIKeyKmsKeyoptionalIKey= None#
The KMS key used to encrypt the dockerfile template.
osVersionoptionalOSVersionos_versionoptionalOSVersionosVersionoptionalOSVersionOsVersionoptionalOSVersionOsVersionoptionalOSVersion#
The operating system (OS) version of the base image.

Default: Image Builder will determine the OS version of the base image, if sourced from a third-party container registry. Otherwise, the OS version of the base image is required.

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string= None#
The tags to apply to the container recipe.
targetRepositoryRepositorytarget_repositoryRepositorytargetRepositoryRepositoryTargetRepositoryRepositoryTargetRepositoryRepositoryrequired#
The container repository where the output container image is stored.
workingDirectoryoptionalstringworking_directoryoptionalstrworkingDirectoryoptionalStringWorkingDirectoryoptionalstringWorkingDirectoryoptional*string#
The working directory for use during build and test workflows.

Default: the Image Builder default working directory is used. For Linux and macOS builds, this would be /tmp. For Windows builds, this would be C:/