DockerBuildAssetOptions

class aws_cdk.aws_lambda.DockerBuildAssetOptions(*, build_args=None, file=None, platform=None, image_path=None, output_path=None)

Bases: aws_cdk.core.DockerBuildOptions

Options when creating an asset from a Docker build.

Parameters
  • build_args (Optional[Mapping[str, str]]) – Build args. Default: - no build args

  • file (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 specified

  • image_path (Optional[str]) – The path in the Docker image where the asset is located after the build operation. Default: /asset

  • output_path (Optional[str]) – 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

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

Return type

Optional[Mapping[str, str]]

file

Name of the Dockerfile, must relative to the docker build path.

Default

Dockerfile

Return type

Optional[str]

image_path

The path in the Docker image where the asset is located after the build operation.

Default

/asset

Return type

Optional[str]

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

Return type

Optional[str]

platform

Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.

Example value: linux/amd64

Default
  • no platform specified

Return type

Optional[str]