Interface DockerImageAssetOptions
- All Superinterfaces:
CopyOptions,FileCopyOptions,FileFingerprintOptions,FingerprintOptions,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
AssetImageCodeProps,AssetImageProps,DockerImageAssetProps
- All Known Implementing Classes:
AssetImageCodeProps.Jsii$Proxy,AssetImageProps.Jsii$Proxy,DockerImageAssetOptions.Jsii$Proxy,DockerImageAssetProps.Jsii$Proxy
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.assets.*;
import software.amazon.awscdk.services.ecr.assets.*;
import software.amazon.awscdk.core.*;
NetworkMode networkMode;
Platform platform;
DockerImageAssetOptions dockerImageAssetOptions = DockerImageAssetOptions.builder()
.buildArgs(Map.of(
"buildArgsKey", "buildArgs"))
.exclude(List.of("exclude"))
.extraHash("extraHash")
.file("file")
.follow(FollowMode.NEVER)
.followSymlinks(SymlinkFollowMode.NEVER)
.ignoreMode(IgnoreMode.GLOB)
.invalidation(DockerImageAssetInvalidationOptions.builder()
.buildArgs(false)
.extraHash(false)
.file(false)
.networkMode(false)
.platform(false)
.repositoryName(false)
.target(false)
.build())
.networkMode(networkMode)
.platform(platform)
.repositoryName("repositoryName")
.target("target")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDockerImageAssetOptionsstatic final classAn implementation forDockerImageAssetOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Build args to pass to thedocker buildcommand.Deprecated.default StringDeprecated.default StringgetFile()Path to the Dockerfile (relative to the directory).default IgnoreModeDeprecated.Options to control which parameters are used to invalidate the asset hash.default NetworkModeNetworking mode for the RUN commands during build.default PlatformPlatform to build for.default StringDeprecated.default StringDocker target to build to.Methods inherited from interface software.amazon.awscdk.assets.CopyOptions
getFollowMethods inherited from interface software.amazon.awscdk.core.FileCopyOptions
getFollowSymlinksMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBuildArgs
Build args to pass to thedocker buildcommand.Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such as
lambda.functionArnorqueue.queueUrl).Default: - no build args are passed
-
getFile
Path to the Dockerfile (relative to the directory).Default: 'Dockerfile'
-
getInvalidation
Options to control which parameters are used to invalidate the asset hash.Default: - hash all parameters
-
getNetworkMode
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)
-
getPlatform
Platform to build for.Requires Docker Buildx.
Default: - no platform specified (the current machine architecture will be used)
-
getRepositoryName
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
-
getTarget
Docker target to build to.Default: - no target
-
getExtraHash
Deprecated.(deprecated) Extra information to encode into the fingerprint (e.g. build instructions and other inputs).Default: - hash is only based on source content
- Specified by:
getExtraHashin interfaceFileFingerprintOptions- Specified by:
getExtraHashin interfaceFingerprintOptions
-
getExclude
Deprecated.(deprecated) Glob patterns to exclude from the copy.Default: nothing is excluded
- Specified by:
getExcludein interfaceCopyOptions- Specified by:
getExcludein interfaceFileCopyOptions
-
getIgnoreMode
Deprecated.(deprecated) The ignore behavior to use for exclude patterns.Default: - GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the '
- Specified by:
getIgnoreModein interfaceCopyOptions- Specified by:
getIgnoreModein interfaceFileCopyOptions
-
builder
- Returns:
- a
DockerImageAssetOptions.BuilderofDockerImageAssetOptions
-
Stack.addDockerImageAsset.