DockerBuildAssetOptions
- class aws_cdk.aws_lambda.DockerBuildAssetOptions(*, build_args=None, cache_disabled=None, cache_from=None, cache_to=None, file=None, network=None, platform=None, target_stage=None, image_path=None, output_path=None)
 Bases:
DockerBuildOptionsOptions when creating an asset from a Docker build.
- Parameters:
 build_args (
Optional[Mapping[str,str]]) – Build args. Default: - no build argscache_disabled (
Optional[bool]) – Disable the cache and pass--no-cacheto thedocker buildcommand. Default: - cache is usedcache_from (
Optional[Sequence[Union[DockerCacheOption,Dict[str,Any]]]]) – Cache from options to pass to thedocker buildcommand. Default: - no cache from args are passedcache_to (
Union[DockerCacheOption,Dict[str,Any],None]) – Cache to options to pass to thedocker buildcommand. Default: - no cache to args are passedfile (
Optional[str]) – Name of the Dockerfile, must relative to the docker build path. Default:Dockerfilenetwork (
Optional[str]) – Docker Networking options. Default: - no networking optionsplatform (
Optional[str]) – Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. Example value:linux/amd64Default: - no platform specifiedtarget_stage (
Optional[str]) – Set build target for multi-stage container builds. Any stage defined afterwards will be ignored. Example value:build-envDefault: - Build all stages defined in the Dockerfileimage_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. from aws_cdk import aws_lambda as lambda_ docker_build_asset_options = lambda.DockerBuildAssetOptions( build_args={ "build_args_key": "buildArgs" }, cache_disabled=False, cache_from=[DockerCacheOption( type="type", # the properties below are optional params={ "params_key": "params" } )], cache_to=DockerCacheOption( type="type", # the properties below are optional params={ "params_key": "params" } ), file="file", image_path="imagePath", network="network", output_path="outputPath", platform="platform", target_stage="targetStage" )
Attributes
- build_args
 Build args.
- Default:
 no build args
- cache_disabled
 Disable the cache and pass
--no-cacheto thedocker buildcommand.- Default:
 cache is used
- cache_from
 Cache from options to pass to the
docker buildcommand.- Default:
 no cache from args are passed
- cache_to
 Cache to options to pass to the
docker buildcommand.- Default:
 no cache to args are passed
- 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
- network
 Docker Networking options.
- Default:
 no networking options
- 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
- target_stage
 Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.
Example value:
build-env- Default:
 Build all stages defined in the Dockerfile