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
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
});
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
)
ContainerRecipe containerRecipe = ContainerRecipe.Builder.create(this, "MyContainerRecipe")
.baseImage(BaseContainerImage.fromDockerHub("amazonlinux", "latest"))
.targetRepository(Repository.fromEcr(Repository.fromRepositoryName(this, "Repository", "my-container-repo")))
.build();
ImagePipeline containerPipeline = ImagePipeline.Builder.create(this, "MyContainerPipeline")
.recipe(exampleContainerRecipe)
.build();
// Install: dotnet add package Amazon.CDK.AWS.ImageBuilder.Alpha
var containerRecipe = new ContainerRecipe(this, "MyContainerRecipe", new ContainerRecipeProps {
BaseImage = BaseContainerImage.FromDockerHub("amazonlinux", "latest"),
TargetRepository = Repository.FromEcr(Repository.FromRepositoryName(this, "Repository", "my-container-repo"))
});
var containerPipeline = new ImagePipeline(this, "MyContainerPipeline", new ImagePipelineProps {
Recipe = exampleContainerRecipe
});
// Install: go get github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2
containerRecipe := imagebuilder.NewContainerRecipe(this, jsii.String("MyContainerRecipe"), &ContainerRecipeProps{
BaseImage: imagebuilder.BaseContainerImage_*FromDockerHub(jsii.String("amazonlinux"), jsii.String("latest")),
TargetRepository: imagebuilder.Repository_*FromEcr(ecr.Repository_*FromRepositoryName(this, jsii.String("Repository"), jsii.String("my-container-repo"))),
})
containerPipeline := imagebuilder.NewImagePipeline(this, jsii.String("MyContainerPipeline"), &ImagePipelineProps{
Recipe: exampleContainerRecipe,
})
Properties
baseImageBaseContainerImagebase_imageBaseContainerImagebaseImageBaseContainerImageBaseImageBaseContainerImageBaseImageBaseContainerImagerequired#componentsoptionalComponentConfiguration[]componentsoptionaltyping.List[ComponentConfiguration]componentsoptionalList<ComponentConfiguration>ComponentsoptionalComponentConfiguration[]Componentsoptional*[]ComponentConfiguration= None#containerRecipeNameoptionalstringcontainer_recipe_nameoptionalstrcontainerRecipeNameoptionalStringContainerRecipeNameoptionalstringContainerRecipeNameoptional*string#Default: a name is generated
containerRecipeVersionoptionalstringcontainer_recipe_versionoptionalstrcontainerRecipeVersionoptionalStringContainerRecipeVersionoptionalstringContainerRecipeVersionoptional*string= 1.0.x#descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= None#dockerfileoptionalDockerfileDatadockerfileoptionalDockerfileDatadockerfileoptionalDockerfileDataDockerfileoptionalDockerfileDataDockerfileoptionalDockerfileData#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#Default: the block devices of the instance image will be used
instanceImageoptionalContainerInstanceImageinstance_imageoptionalContainerInstanceImageinstanceImageoptionalContainerInstanceImageInstanceImageoptionalContainerInstanceImageInstanceImageoptionalContainerInstanceImage#Default: Image Builder will use the appropriate ECS-optimized AMI
osVersionoptionalOSVersionos_versionoptionalOSVersionosVersionoptionalOSVersionOsVersionoptionalOSVersionOsVersionoptionalOSVersion#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#targetRepositoryRepositorytarget_repositoryRepositorytargetRepositoryRepositoryTargetRepositoryRepositoryTargetRepositoryRepositoryrequired#workingDirectoryoptionalstringworking_directoryoptionalstrworkingDirectoryoptionalStringWorkingDirectoryoptionalstringWorkingDirectoryoptional*string#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:/