Class DockerImageSource.Builder
java.lang.Object
software.amazon.awscdk.cloudassembly.schema.DockerImageSource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DockerImageSource>
- Enclosing interface:
- DockerImageSource
@Stability(Stable)
public static final class DockerImageSource.Builder
extends Object
implements software.amazon.jsii.Builder<DockerImageSource>
A builder for
DockerImageSource-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofDockerImageSource.getDirectory()dockerBuildArgs(Map<String, String> dockerBuildArgs) Sets the value ofDockerImageSource.getDockerBuildArgs()dockerBuildTarget(String dockerBuildTarget) Sets the value ofDockerImageSource.getDockerBuildTarget()dockerFile(String dockerFile) Sets the value ofDockerImageSource.getDockerFile()executable(List<String> executable) Sets the value ofDockerImageSource.getExecutable()networkMode(String networkMode) Sets the value ofDockerImageSource.getNetworkMode()Sets the value ofDockerImageSource.getPlatform()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
directory
Sets the value ofDockerImageSource.getDirectory()- Parameters:
directory- The directory containing the Docker image build instructions. This path is relative to the asset manifest location.- Returns:
this
-
dockerBuildArgs
@Stability(Stable) public DockerImageSource.Builder dockerBuildArgs(Map<String, String> dockerBuildArgs) Sets the value ofDockerImageSource.getDockerBuildArgs()- Parameters:
dockerBuildArgs- Additional build arguments. Only allowed whendirectoryis set.- Returns:
this
-
dockerBuildTarget
Sets the value ofDockerImageSource.getDockerBuildTarget()- Parameters:
dockerBuildTarget- Target build stage in a Dockerfile with multiple build stages. Only allowed whendirectoryis set.- Returns:
this
-
dockerFile
Sets the value ofDockerImageSource.getDockerFile()- Parameters:
dockerFile- The name of the file with build instructions. Only allowed whendirectoryis set.- Returns:
this
-
executable
Sets the value ofDockerImageSource.getExecutable()- Parameters:
executable- A command-line executable that returns the name of a local Docker image on stdout after being run.- Returns:
this
-
networkMode
Sets the value ofDockerImageSource.getNetworkMode()- Parameters:
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.- Returns:
this
-
platform
Sets the value ofDockerImageSource.getPlatform()- Parameters:
platform- Platform to build for. Requires Docker Buildx. Specify this property to build images on a specific platform/architecture.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<DockerImageSource>- Returns:
- a new instance of
DockerImageSource - Throws:
NullPointerException- if any required attribute was not provided
-