@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.890Z") @Stability(value=Stable) public interface DockerImageAssetSource extends software.amazon.jsii.JsiiSerializable
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
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")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
DockerImageAssetSource.Builder
A builder for
DockerImageAssetSource |
static class |
DockerImageAssetSource.Jsii$Proxy
An implementation for
DockerImageAssetSource |
| Modifier and Type | Method and Description |
|---|---|
static DockerImageAssetSource.Builder |
builder() |
default String |
getDirectoryName()
The directory where the Dockerfile is stored, must be relative to the cloud assembly root.
|
default Map<String,String> |
getDockerBuildArgs()
Build args to pass to the `docker build` command.
|
default String |
getDockerBuildTarget()
Docker target to build to.
|
default String |
getDockerFile()
Path to the Dockerfile (relative to the directory).
|
default List<String> |
getExecutable()
An external command that will produce the packaged asset.
|
default String |
getNetworkMode()
Networking mode for the RUN commands during build.
|
default String |
getPlatform()
Platform to build for.
|
String |
getSourceHash()
The hash of the contents of the docker build context.
|
@Stability(value=Stable) @NotNull String getSourceHash()
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).
@Stability(value=Stable) @Nullable default String getDirectoryName()
Default: - Exactly one of `directoryName` and `executable` is required
@Stability(value=Stable) @Nullable default Map<String,String> getDockerBuildArgs()
Since Docker build arguments are resolved before deployment, keys and
values cannot refer to unresolved tokens (such as lambda.functionArn or
queue.queueUrl).
Only allowed when directoryName is specified.
Default: - no build args are passed
@Stability(value=Stable) @Nullable default String getDockerBuildTarget()
Only allowed when directoryName is specified.
Default: - no target
@Stability(value=Stable) @Nullable default String getDockerFile()
Only allowed when directoryName is specified.
Default: - no file
@Stability(value=Stable) @Nullable default List<String> getExecutable()
The command should produce the name of a local Docker image on stdout.
Default: - Exactly one of `directoryName` and `executable` is required
@Stability(value=Stable) @Nullable default String getNetworkMode()
Specify this property to build images on a specific networking mode.
Default: - no networking mode specified
@Stability(value=Stable) @Nullable default String getPlatform()
Specify this property to build images on a specific platform.
Default: - no platform specified (the current machine architecture will be used)
@Stability(value=Stable) static DockerImageAssetSource.Builder builder()
DockerImageAssetSource.Builder of DockerImageAssetSourceCopyright © 2022. All rights reserved.