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.127.0 (build 2117ad5)",
date="2026-03-27T13:11:52.033Z")
@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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDockerBuildOptionsstatic final classAn implementation forDockerBuildOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic DockerBuildOptions.Builderbuilder()Build args.Build contexts to pass to thedocker buildcommand.default BooleanDisable the cache and pass--no-cacheto thedocker buildcommand.default List<DockerCacheOption> Cache from options to pass to thedocker buildcommand.default DockerCacheOptionCache to options to pass to thedocker buildcommand.default StringgetFile()Name of the Dockerfile, must relative to the docker build path.default StringDocker Networking options.default StringSet platform if server is multi-platform capable.default StringSet 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
-
getBuildContexts
Build contexts to pass to thedocker buildcommand.Build contexts can be used to specify additional directories or images to use during the build. Each entry specifies a named build context and its source (a directory path, a URL, or a docker image).
Default: - no additional build contexts
- See Also:
-
getCacheDisabled
Disable the cache and pass--no-cacheto thedocker buildcommand.Default: - cache is used
-
getCacheFrom
Cache from options to pass to thedocker buildcommand.Default: - no cache from args are passed
-
getCacheTo
Cache to options to pass to thedocker buildcommand.Default: - no cache to args are passed
-
getFile
Name of the Dockerfile, must relative to the docker build path.Default: `Dockerfile`
-
getNetwork
Docker Networking options.Default: - no networking options
-
getPlatform
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.Example value:
linux/amd64Default: - no platform specified
-
getTargetStage
Set build target for multi-stage container builds. Any stage defined afterwards will be ignored.Example value:
build-envDefault: - Build all stages defined in the Dockerfile
-
builder
- Returns:
- a
DockerBuildOptions.BuilderofDockerBuildOptions
-