Table of Contents

Interface IDockerBuildOptions

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

Docker build options.

public interface IDockerBuildOptions

Examples

new Function(this, "Function", new FunctionProps {
                Code = Code.FromAsset("/path/to/handler", new AssetOptions {
                    Bundling = new BundlingOptions {
                        Image = DockerImage.FromBuild("/path/to/dir/with/DockerFile", new DockerBuildOptions {
                            BuildArgs = new Dictionary<string, string> {
                                { "ARG1", "value1" }
                            }
                        }),
                        Command = new [] { "my", "cool", "command" }
                    }
                }),
                Runtime = Runtime.PYTHON_3_9,
                Handler = "index.handler"
            });

Remarks

ExampleMetadata: infused

Properties

BuildArgs

Build args.

IDictionary<string, string>? BuildArgs { get; }

Property Value

IDictionary<string, string>

Remarks

Default: - no build args

File

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

string? File { get; }

Property Value

string

Remarks

Default: Dockerfile

Platform

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

string? Platform { get; }

Property Value

string

Remarks

Example value: linux/amd64

Default: - no platform specified