Show / Hide Table of Contents

Interface IDockerBuildOptions

Docker build options.

Namespace: Amazon.CDK
Assembly: Amazon.CDK.dll
Syntax (csharp)
public interface IDockerBuildOptions
Syntax (vb)
Public Interface IDockerBuildOptions
Remarks

ExampleMetadata: infused

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"
});

Synopsis

Properties

BuildArgs

Build args.

File

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

Platform

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

Properties

BuildArgs

Build args.

virtual IDictionary<string, string> BuildArgs { get; }
Property Value

System.Collections.Generic.IDictionary<System.String, System.String>

Remarks

Default: - no build args

File

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

virtual string File { get; }
Property Value

System.String

Remarks

Default: Dockerfile

Platform

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

virtual string Platform { get; }
Property Value

System.String

Remarks

Example value: linux/amd64

Default: - no platform specified

Back to top Generated by DocFX