Class DockerBuildOptions
Docker build options.
public class DockerBuildOptions : IDockerBuildOptions
- Inheritance
-
DockerBuildOptions
- Implements
- Inherited Members
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
Constructors
DockerBuildOptions()
public DockerBuildOptions()
Properties
BuildArgs
Build args.
public IDictionary<string, string>? BuildArgs { get; set; }
Property Value
Remarks
Default: - no build args
File
Name of the Dockerfile, must relative to the docker build path.
public string? File { get; set; }
Property Value
Remarks
Default: Dockerfile
Platform
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
public string? Platform { get; set; }
Property Value
Remarks
Example value: linux/amd64
Default: - no platform specified