Class ContainerRecipe.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.ContainerRecipe.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerRecipe>
- Enclosing class:
ContainerRecipe
@Stability(Experimental)
public static final class ContainerRecipe.Builder
extends Object
implements software.amazon.jsii.Builder<ContainerRecipe>
(experimental) A fluent builder for
ContainerRecipe.-
Method Summary
Modifier and TypeMethodDescriptionbaseImage(BaseContainerImage baseImage) (experimental) The base image for customizations specified in the container recipe.build()components(List<? extends ComponentConfiguration> components) (experimental) The list of component configurations to apply in the image build.containerRecipeName(String containerRecipeName) (experimental) The name of the container recipe.containerRecipeVersion(String containerRecipeVersion) (experimental) The version of the container recipe.static ContainerRecipe.Builderdescription(String description) (experimental) The description of the container recipe.dockerfile(DockerfileData dockerfile) (experimental) The dockerfile template used to build the container image.instanceBlockDevices(List<? extends BlockDevice> instanceBlockDevices) (experimental) The block devices to attach to the instance used for building, testing, and distributing the container image.instanceImage(ContainerInstanceImage instanceImage) (experimental) The image to use to launch the instance used for building, testing, and distributing the container image.(experimental) The KMS key used to encrypt the dockerfile template.(experimental) The operating system (OS) version of the base image.(experimental) The tags to apply to the container recipe.targetRepository(Repository targetRepository) (experimental) The container repository where the output container image is stored.workingDirectory(String workingDirectory) (experimental) The working directory for use during build and test workflows.
-
Method Details
-
create
@Stability(Experimental) public static ContainerRecipe.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
ContainerRecipe.Builder.
-
baseImage
(experimental) The base image for customizations specified in the container recipe.- Parameters:
baseImage- The base image for customizations specified in the container recipe. This parameter is required.- Returns:
this
-
targetRepository
@Stability(Experimental) public ContainerRecipe.Builder targetRepository(Repository targetRepository) (experimental) The container repository where the output container image is stored.- Parameters:
targetRepository- The container repository where the output container image is stored. This parameter is required.- Returns:
this
-
components
@Stability(Experimental) public ContainerRecipe.Builder components(List<? extends ComponentConfiguration> components) (experimental) The list of component configurations to apply in the image build.Default: None
- Parameters:
components- The list of component configurations to apply in the image build. This parameter is required.- Returns:
this
-
containerRecipeName
@Stability(Experimental) public ContainerRecipe.Builder containerRecipeName(String containerRecipeName) (experimental) The name of the container recipe.Default: a name is generated
- Parameters:
containerRecipeName- The name of the container recipe. This parameter is required.- Returns:
this
-
containerRecipeVersion
@Stability(Experimental) public ContainerRecipe.Builder containerRecipeVersion(String containerRecipeVersion) (experimental) The version of the container recipe.Default: 1.0.x
- Parameters:
containerRecipeVersion- The version of the container recipe. This parameter is required.- Returns:
this
-
description
(experimental) The description of the container recipe.Default: None
- Parameters:
description- The description of the container recipe. This parameter is required.- Returns:
this
-
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
- Parameters:
dockerfile- The dockerfile template used to build the container image. This parameter is required.- Returns:
this
-
instanceBlockDevices
@Stability(Experimental) public ContainerRecipe.Builder instanceBlockDevices(List<? extends BlockDevice> instanceBlockDevices) (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
- Parameters:
instanceBlockDevices- The block devices to attach to the instance used for building, testing, and distributing the container image. This parameter is required.- Returns:
this
-
instanceImage
@Stability(Experimental) public ContainerRecipe.Builder instanceImage(ContainerInstanceImage instanceImage) (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
- Parameters:
instanceImage- The image to use to launch the instance used for building, testing, and distributing the container image. This parameter is required.- Returns:
this
-
kmsKey
(experimental) The KMS key used to encrypt the dockerfile template.Default: None
- Parameters:
kmsKey- The KMS key used to encrypt the dockerfile template. This parameter is required.- Returns:
this
-
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.
- Parameters:
osVersion- The operating system (OS) version of the base image. This parameter is required.- Returns:
this
-
tags
(experimental) The tags to apply to the container recipe.Default: None
- Parameters:
tags- The tags to apply to the container recipe. This parameter is required.- Returns:
this
-
workingDirectory
(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:/
- Parameters:
workingDirectory- The working directory for use during build and test workflows. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ContainerRecipe>- Returns:
- a newly built instance of
ContainerRecipe.
-