Package software.amazon.awscdk
Interface DockerBuildOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
DockerBuildAssetOptions
- All Known Implementing Classes:
DockerBuildAssetOptions.Jsii$Proxy
,DockerBuildOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-11T23:26:27.520Z")
@Stability(Stable)
public interface DockerBuildOptions
extends software.amazon.jsii.JsiiSerializable
Docker build options.
Example:
Function.Builder.create(this, "Function") .code(Code.fromAsset("/path/to/handler", AssetOptions.builder() .bundling(BundlingOptions.builder() .image(DockerImage.fromBuild("/path/to/dir/with/DockerFile", DockerBuildOptions.builder() .buildArgs(Map.of( "ARG1", "value1")) .build())) .command(List.of("my", "cool", "command")) .build()) .build())) .runtime(Runtime.PYTHON_3_9) .handler("index.handler") .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDockerBuildOptions
static final class
An implementation forDockerBuildOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic DockerBuildOptions.Builder
builder()
Build args.default Boolean
Disable the cache and pass--no-cache
to thedocker build
command.default List<DockerCacheOption>
Cache from options to pass to thedocker build
command.default DockerCacheOption
Cache to options to pass to thedocker build
command.default String
getFile()
Name of the Dockerfile, must relative to the docker build path.default String
Set platform if server is multi-platform capable.default String
Set build target for multi-stage container builds.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBuildArgs
Build args.Default: - no build args
-
getCacheDisabled
Disable the cache and pass--no-cache
to thedocker build
command.Default: - cache is used
-
getCacheFrom
Cache from options to pass to thedocker build
command.Default: - no cache from args are passed
-
getCacheTo
Cache to options to pass to thedocker build
command.Default: - no cache to args are passed
-
getFile
Name of the Dockerfile, must relative to the docker build path.Default: `Dockerfile`
-
getPlatform
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.Example value:
linux/amd64
Default: - no platform specified
-
getTargetStage
Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.Example value:
build-env
Default: - Build all stages defined in the Dockerfile
-
builder
- Returns:
- a
DockerBuildOptions.Builder
ofDockerBuildOptions
-