Class DockerImageAssetOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ecr.assets.DockerImageAssetOptions.Builder
- All Implemented Interfaces:
- software.amazon.jsii.Builder<DockerImageAssetOptions>
- Enclosing interface:
- DockerImageAssetOptions
@Stability(Stable)
public static final class DockerImageAssetOptions.Builder
extends Object
implements software.amazon.jsii.Builder<DockerImageAssetOptions>
A builder for 
DockerImageAssetOptions- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofDockerImageAssetOptions.getBuildArgs()Sets the value ofDockerImageAssetOptions.getExclude()Sets the value ofDockerImageAssetOptions.getExtraHash()Sets the value ofDockerImageAssetOptions.getFile()follow(FollowMode follow) Deprecated.use `followSymlinks` insteadfollowSymlinks(SymlinkFollowMode followSymlinks) Sets the value ofFileCopyOptions.getFollowSymlinks()ignoreMode(IgnoreMode ignoreMode) Sets the value ofDockerImageAssetOptions.getIgnoreMode()invalidation(DockerImageAssetInvalidationOptions invalidation) Sets the value ofDockerImageAssetOptions.getInvalidation()networkMode(NetworkMode networkMode) Sets the value ofDockerImageAssetOptions.getNetworkMode()Sets the value ofDockerImageAssetOptions.getPlatform()repositoryName(String repositoryName) Deprecated.to control the location of docker image assets, please override `Stack.addDockerImageAsset`.Sets the value ofDockerImageAssetOptions.getTarget()
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
buildArgsSets the value ofDockerImageAssetOptions.getBuildArgs()- Parameters:
- buildArgs- Build args to pass to the- docker buildcommand. Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such as- lambda.functionArnor- queue.queueUrl).
- Returns:
- this
 
- 
fileSets the value ofDockerImageAssetOptions.getFile()- Parameters:
- file- Path to the Dockerfile (relative to the directory).
- Returns:
- this
 
- 
invalidation@Stability(Stable) public DockerImageAssetOptions.Builder invalidation(DockerImageAssetInvalidationOptions invalidation) Sets the value ofDockerImageAssetOptions.getInvalidation()- Parameters:
- invalidation- Options to control which parameters are used to invalidate the asset hash.
- Returns:
- this
 
- 
networkModeSets the value ofDockerImageAssetOptions.getNetworkMode()- Parameters:
- networkMode- Networking mode for the RUN commands during build. Support docker API 1.25+.
- Returns:
- this
 
- 
platformSets the value ofDockerImageAssetOptions.getPlatform()- Parameters:
- platform- Platform to build for. Requires Docker Buildx.
- Returns:
- this
 
- 
repositoryName@Stability(Deprecated) @Deprecated public DockerImageAssetOptions.Builder repositoryName(String repositoryName) Deprecated.to control the location of docker image assets, please override `Stack.addDockerImageAsset`. this feature will be removed in future releases.Sets the value ofDockerImageAssetOptions.getRepositoryName()- Parameters:
- repositoryName- ECR repository name. Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts.
- Returns:
- this
 
- 
targetSets the value ofDockerImageAssetOptions.getTarget()- Parameters:
- target- Docker target to build to.
- Returns:
- this
 
- 
extraHashSets the value ofDockerImageAssetOptions.getExtraHash()- Parameters:
- extraHash- Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
- Returns:
- this
 
- 
excludeSets the value ofDockerImageAssetOptions.getExclude()- Parameters:
- exclude- Glob patterns to exclude from the copy.
- Returns:
- this
 
- 
followDeprecated.use `followSymlinks` insteadSets the value ofCopyOptions.getFollow()- Parameters:
- follow- A strategy for how to handle symlinks.
- Returns:
- this
 
- 
ignoreModeSets the value ofDockerImageAssetOptions.getIgnoreMode()- Parameters:
- ignoreMode- The ignore behavior to use for exclude patterns.
- Returns:
- this
 
- 
followSymlinks@Stability(Stable) public DockerImageAssetOptions.Builder followSymlinks(SymlinkFollowMode followSymlinks) Sets the value ofFileCopyOptions.getFollowSymlinks()- Parameters:
- followSymlinks- A strategy for how to handle symlinks.
- Returns:
- this
 
- 
buildBuilds the configured instance.- Specified by:
- buildin interface- software.amazon.jsii.Builder<DockerImageAssetOptions>
- Returns:
- a new instance of DockerImageAssetOptions
- Throws:
- NullPointerException- if any required attribute was not provided
 
 
-