aws-cdk-lib.aws_lambda.DockerBuildAssetOptions

interface DockerBuildAssetOptions

LanguageType name
.NETAmazon.CDK.AWS.Lambda.DockerBuildAssetOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#DockerBuildAssetOptions
Javasoftware.amazon.awscdk.services.lambda.DockerBuildAssetOptions
Pythonaws_cdk.aws_lambda.DockerBuildAssetOptions
TypeScript (source)aws-cdk-lib » aws_lambda » DockerBuildAssetOptions

Options when creating an asset from a Docker build.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const dockerBuildAssetOptions: lambda.DockerBuildAssetOptions = {
  buildArgs: {
    buildArgsKey: 'buildArgs',
  },
  file: 'file',
  imagePath: 'imagePath',
  outputPath: 'outputPath',
  platform: 'platform',
  targetStage: 'targetStage',
};

Properties

NameTypeDescription
buildArgs?{ [string]: string }Build args.
file?stringName of the Dockerfile, must relative to the docker build path.
imagePath?stringThe path in the Docker image where the asset is located after the build operation.
outputPath?stringThe path on the local filesystem where the asset will be copied using docker cp.
platform?stringSet platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
targetStage?stringSet build target for multi-stage container builds. Any stage defined afterwards will be ignored.

buildArgs?

Type: { [string]: string } (optional, default: no build args)

Build args.


file?

Type: string (optional, default: Dockerfile)

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


imagePath?

Type: string (optional, default: /asset)

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


outputPath?

Type: string (optional, default: a unique temporary directory in the system temp directory)

The path on the local filesystem where the asset will be copied using docker cp.


platform?

Type: string (optional, default: no platform specified)

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

Example value: linux/amd64


targetStage?

Type: string (optional, default: Build all stages defined in the Dockerfile)

Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.

Example value: build-env