@Stability(value=Stable) public static final class DockerImageAssetSource.Builder extends Object implements software.amazon.jsii.Builder<DockerImageAssetSource>
DockerImageAssetSource
Constructor and Description |
---|
Builder() |
@Stability(value=Stable) public DockerImageAssetSource.Builder sourceHash(String sourceHash)
DockerImageAssetSource.getSourceHash()
sourceHash
- The hash of the contents of the docker build context. This parameter is required.
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).
this
@Stability(value=Stable) public DockerImageAssetSource.Builder directoryName(String directoryName)
DockerImageAssetSource.getDirectoryName()
directoryName
- The directory where the Dockerfile is stored, must be relative to the cloud assembly root.this
@Stability(value=Stable) public DockerImageAssetSource.Builder dockerBuildArgs(Map<String,String> dockerBuildArgs)
DockerImageAssetSource.getDockerBuildArgs()
dockerBuildArgs
- Build args to pass to the `docker build` command.
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.
this
@Stability(value=Stable) public DockerImageAssetSource.Builder dockerBuildTarget(String dockerBuildTarget)
DockerImageAssetSource.getDockerBuildTarget()
dockerBuildTarget
- Docker target to build to.
Only allowed when directoryName
is specified.this
@Stability(value=Stable) public DockerImageAssetSource.Builder dockerFile(String dockerFile)
DockerImageAssetSource.getDockerFile()
dockerFile
- Path to the Dockerfile (relative to the directory).
Only allowed when directoryName
is specified.this
@Stability(value=Stable) public DockerImageAssetSource.Builder executable(List<String> executable)
DockerImageAssetSource.getExecutable()
executable
- An external command that will produce the packaged asset.
The command should produce the name of a local Docker image on stdout
.this
@Stability(value=Stable) public DockerImageAssetSource.Builder networkMode(String networkMode)
DockerImageAssetSource.getNetworkMode()
networkMode
- 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.this
@Stability(value=Deprecated) @Deprecated public DockerImageAssetSource.Builder repositoryName(String repositoryName)
DockerImageAssetSource.getRepositoryName()
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.this
@Stability(value=Stable) public DockerImageAssetSource build()
build
in interface software.amazon.jsii.Builder<DockerImageAssetSource>
DockerImageAssetSource
NullPointerException
- if any required attribute was not providedCopyright © 2022. All rights reserved.