Interface DockerImageAssetSource
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DockerImageAssetSource.Jsii$Proxy
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.core.*; DockerImageAssetSource dockerImageAssetSource = DockerImageAssetSource.builder() .sourceHash("sourceHash") // the properties below are optional .directoryName("directoryName") .dockerBuildArgs(Map.of( "dockerBuildArgsKey", "dockerBuildArgs")) .dockerBuildTarget("dockerBuildTarget") .dockerFile("dockerFile") .executable(List.of("executable")) .networkMode("networkMode") .platform("platform") .repositoryName("repositoryName") .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forDockerImageAssetSource
static final class
An implementation forDockerImageAssetSource
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
The directory where the Dockerfile is stored, must be relative to the cloud assembly root.Build args to pass to thedocker build
command.default String
Docker target to build to.default String
Path to the Dockerfile (relative to the directory).An external command that will produce the packaged asset.default String
Networking mode for the RUN commands during build.default String
Platform to build for.default String
Deprecated.repository name should be specified at the environment-level and not at the image levelThe hash of the contents of the docker build context.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getSourceHash
The hash of the contents of the docker build context.This hash is used throughout the system to identify this image and avoid duplicate work in case the source did not change.
NOTE: this means that if you wish to update your docker image, you must make a modification to the source (e.g. add some metadata to your Dockerfile).
-
getDirectoryName
The directory where the Dockerfile is stored, must be relative to the cloud assembly root.Default: - Exactly one of `directoryName` and `executable` is required
-
getDockerBuildArgs
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
).Only allowed when
directoryName
is specified.Default: - no build args are passed
-
getDockerBuildTarget
Docker target to build to.Only allowed when
directoryName
is specified.Default: - no target
-
getDockerFile
Path to the Dockerfile (relative to the directory).Only allowed when
directoryName
is specified.Default: - no file
-
getExecutable
An external command that will produce the packaged asset.The command should produce the name of a local Docker image on
stdout
.Default: - Exactly one of `directoryName` and `executable` is required
-
getNetworkMode
Networking mode for the RUN commands during build. Requires Docker Engine API v1.25+.Specify this property to build images on a specific networking mode.
Default: - no networking mode specified
-
getPlatform
Platform to build for. Requires Docker Buildx.Specify this property to build images on a specific platform.
Default: - no platform specified (the current machine architecture will be used)
-
getRepositoryName
Deprecated.repository name should be specified at the environment-level and not at the image level(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: - automatically derived from the asset's ID.
-
builder
- Returns:
- a
DockerImageAssetSource.Builder
ofDockerImageAssetSource
-