interface DockerBuildOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.DockerBuildOptions |
Java | software.amazon.awscdk.core.DockerBuildOptions |
Python | aws_cdk.core.DockerBuildOptions |
TypeScript (source) | @aws-cdk/core » DockerBuildOptions |
Docker build options.
Example
new lambda.Function(this, 'Function', {
code: lambda.Code.fromAsset('/path/to/handler', {
bundling: {
image: DockerImage.fromBuild('/path/to/dir/with/DockerFile', {
buildArgs: {
ARG1: 'value1',
},
}),
command: ['my', 'cool', 'command'],
},
}),
runtime: lambda.Runtime.PYTHON_3_9,
handler: 'index.handler',
});
Properties
Name | Type | Description |
---|---|---|
build | { [string]: string } | Build args. |
file? | string | Name of the Dockerfile, must relative to the docker build path. |
platform? | string | Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. |
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.
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