Class AssetImage.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AssetImage>
- Enclosing class:
AssetImage
AssetImage
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build args to pass to thedocker build
command.static AssetImage.Builder
Glob patterns to exclude from the copy.Extra information to encode into the fingerprint (e.g.Path to the Dockerfile (relative to the directory).follow
(FollowMode follow) Deprecated.followSymlinks
(SymlinkFollowMode followSymlinks) A strategy for how to handle symlinks.ignoreMode
(IgnoreMode ignoreMode) The ignore behavior to use for exclude patterns.invalidation
(DockerImageAssetInvalidationOptions invalidation) Options to control which parameters are used to invalidate the asset hash.networkMode
(NetworkMode networkMode) Networking mode for the RUN commands during build.Platform to build for.repositoryName
(String repositoryName) Deprecated.to control the location of docker image assets, please overrideStack.addDockerImageAsset
.Docker target to build to.
-
Method Details
-
create
- Parameters:
directory
- The directory containing the Dockerfile. This parameter is required.- Returns:
- a new instance of
AssetImage.Builder
.
-
exclude
Glob patterns to exclude from the copy.Default: - nothing is excluded
- Parameters:
exclude
- Glob patterns to exclude from the copy. This parameter is required.- Returns:
this
-
follow
Deprecated.usefollowSymlinks
instead(deprecated) A strategy for how to handle symlinks.Default: Never
- Parameters:
follow
- A strategy for how to handle symlinks. This parameter is required.- Returns:
this
-
ignoreMode
The ignore behavior to use for exclude patterns.Default: IgnoreMode.GLOB
- Parameters:
ignoreMode
- The ignore behavior to use for exclude patterns. This parameter is required.- Returns:
this
-
extraHash
Extra information to encode into the fingerprint (e.g. build instructions and other inputs).Default: - hash is only based on source content
- Parameters:
extraHash
- Extra information to encode into the fingerprint (e.g. build instructions and other inputs). This parameter is required.- Returns:
this
-
followSymlinks
A strategy for how to handle symlinks.Default: SymlinkFollowMode.NEVER
- Parameters:
followSymlinks
- A strategy for how to handle symlinks. This parameter is required.- Returns:
this
-
buildArgs
Build args to pass to thedocker build
command.Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such as
lambda.functionArn
orqueue.queueUrl
).Default: - no build args are passed
- Parameters:
buildArgs
- Build args to pass to thedocker build
command. This parameter is required.- Returns:
this
-
file
Path to the Dockerfile (relative to the directory).Default: 'Dockerfile'
- Parameters:
file
- Path to the Dockerfile (relative to the directory). This parameter is required.- Returns:
this
-
invalidation
@Stability(Stable) public AssetImage.Builder invalidation(DockerImageAssetInvalidationOptions invalidation) Options to control which parameters are used to invalidate the asset hash.Default: - hash all parameters
- Parameters:
invalidation
- Options to control which parameters are used to invalidate the asset hash. This parameter is required.- Returns:
this
-
networkMode
Networking mode for the RUN commands during build.Support docker API 1.25+.
Default: - no networking mode specified (the default networking mode `NetworkMode.DEFAULT` will be used)
- Parameters:
networkMode
- Networking mode for the RUN commands during build. This parameter is required.- Returns:
this
-
platform
Platform to build for.Requires Docker Buildx.
Default: - no platform specified (the current machine architecture will be used)
- Parameters:
platform
- Platform to build for. This parameter is required.- Returns:
this
-
repositoryName
Deprecated.to control the location of docker image assets, please overrideStack.addDockerImageAsset
. this feature will be removed in future releases.(deprecated) 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.
Default: - the default ECR repository for CDK assets
- Parameters:
repositoryName
- ECR repository name. This parameter is required.- Returns:
this
-
target
Docker target to build to.Default: - no target
- Parameters:
target
- Docker target to build to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AssetImage>
- Returns:
- a newly built instance of
AssetImage
.
-
followSymlinks
instead