ContainerRecipeProps
- class aws_cdk.aws_imagebuilder_alpha.ContainerRecipeProps(*, base_image, target_repository, components=None, container_recipe_name=None, container_recipe_version=None, description=None, dockerfile=None, instance_block_devices=None, instance_image=None, kms_key=None, os_version=None, tags=None, working_directory=None)
Bases:
object(experimental) Properties for creating a Container Recipe resource.
- Parameters:
base_image (
BaseContainerImage) – (experimental) The base image for customizations specified in the container recipe.target_repository (
Repository) – (experimental) The container repository where the output container image is stored.components (
Optional[Sequence[Union[ComponentConfiguration,Dict[str,Any]]]]) – (experimental) The list of component configurations to apply in the image build. Default: Nonecontainer_recipe_name (
Optional[str]) – (experimental) The name of the container recipe. Default: a name is generatedcontainer_recipe_version (
Optional[str]) – (experimental) The version of the container recipe. Default: 1.0.xdescription (
Optional[str]) – (experimental) The description of the container recipe. Default: Nonedockerfile (
Optional[DockerfileData]) – (experimental) 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 recipeinstance_block_devices (
Optional[Sequence[Union[BlockDevice,Dict[str,Any]]]]) – (experimental) 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 usedinstance_image (
Optional[ContainerInstanceImage]) – (experimental) 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 AMIkms_key (
Optional[IKey]) – (experimental) The KMS key used to encrypt the dockerfile template. Default: Noneos_version (
Optional[OSVersion]) – (experimental) 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.tags (
Optional[Mapping[str,str]]) – (experimental) The tags to apply to the container recipe. Default: Noneworking_directory (
Optional[str]) – (experimental) 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:/
- Stability:
experimental
- ExampleMetadata:
infused
Example:
container_recipe = imagebuilder.ContainerRecipe(self, "MyContainerRecipe", base_image=imagebuilder.BaseContainerImage.from_docker_hub("amazonlinux", "latest"), target_repository=imagebuilder.Repository.from_ecr( ecr.Repository.from_repository_name(self, "Repository", "my-container-repo")) ) container_pipeline = imagebuilder.ImagePipeline(self, "MyContainerPipeline", recipe=example_container_recipe )
Attributes
- base_image
(experimental) The base image for customizations specified in the container recipe.
- Stability:
experimental
- components
(experimental) The list of component configurations to apply in the image build.
- Default:
None
- Stability:
experimental
- container_recipe_name
(experimental) The name of the container recipe.
- Default:
a name is generated
- Stability:
experimental
- container_recipe_version
(experimental) The version of the container recipe.
- Default:
1.0.x
- Stability:
experimental
- description
(experimental) The description of the container recipe.
- Default:
None
- Stability:
experimental
- dockerfile
(experimental) 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
- Stability:
experimental
- instance_block_devices
(experimental) 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
- Stability:
experimental
- instance_image
(experimental) 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
- Stability:
experimental
- kms_key
(experimental) The KMS key used to encrypt the dockerfile template.
- Default:
None
- Stability:
experimental
- os_version
(experimental) 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.
- Stability:
experimental
- tags
(experimental) The tags to apply to the container recipe.
- Default:
None
- Stability:
experimental
- target_repository
(experimental) The container repository where the output container image is stored.
- Stability:
experimental
- working_directory
(experimental) 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:/
- Stability:
experimental