DockerBuildAssetOptions
- class aws_cdk.aws_lambda.DockerBuildAssetOptions(*, build_args=None, file=None, platform=None, image_path=None, output_path=None)
Bases:
DockerBuildOptions
Options when creating an asset from a Docker build.
- Parameters:
build_args (
Optional
[Mapping
[str
,str
]]) – Build args. Default: - no build argsfile (
Optional
[str
]) – Name of the Dockerfile, must relative to the docker build path. Default:Dockerfile
platform (
Optional
[str
]) – Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. Example value:linux/amd64
Default: - no platform specifiedimage_path (
Optional
[str
]) – The path in the Docker image where the asset is located after the build operation. Default: /assetoutput_path (
Optional
[str
]) – The path on the local filesystem where the asset will be copied usingdocker cp
. Default: - a unique temporary directory in the system temp directory
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_lambda as lambda_ docker_build_asset_options = lambda.DockerBuildAssetOptions( build_args={ "build_args_key": "buildArgs" }, file="file", image_path="imagePath", output_path="outputPath", platform="platform" )
Attributes
- build_args
Build args.
- Default:
no build args
- file
Name of the Dockerfile, must relative to the docker build path.
- Default:
Dockerfile
- image_path
The path in the Docker image where the asset is located after the build operation.
- Default:
/asset
- output_path
The path on the local filesystem where the asset will be copied using
docker cp
.- Default:
a unique temporary directory in the system temp directory
- platform
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
Example value:
linux/amd64
- Default:
no platform specified