Package software.amazon.awscdk.core
Class DockerRunOptions.Builder
java.lang.Object
software.amazon.awscdk.core.DockerRunOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DockerRunOptions>
- Enclosing interface:
- DockerRunOptions
@Stability(Stable)
public static final class DockerRunOptions.Builder
extends Object
implements software.amazon.jsii.Builder<DockerRunOptions>
A builder for
DockerRunOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofDockerRunOptions.getCommand()entrypoint(List<String> entrypoint) Sets the value ofDockerRunOptions.getEntrypoint()environment(Map<String, String> environment) Sets the value ofDockerRunOptions.getEnvironment()securityOpt(String securityOpt) Sets the value ofDockerRunOptions.getSecurityOpt()Sets the value ofDockerRunOptions.getUser()volumes(List<? extends DockerVolume> volumes) Sets the value ofDockerRunOptions.getVolumes()workingDirectory(String workingDirectory) Sets the value ofDockerRunOptions.getWorkingDirectory()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
command
Sets the value ofDockerRunOptions.getCommand()- Parameters:
command- The command to run in the container.- Returns:
this
-
entrypoint
Sets the value ofDockerRunOptions.getEntrypoint()- Parameters:
entrypoint- The entrypoint to run in the container.- Returns:
this
-
environment
Sets the value ofDockerRunOptions.getEnvironment()- Parameters:
environment- The environment variables to pass to the container.- Returns:
this
-
securityOpt
Sets the value ofDockerRunOptions.getSecurityOpt()- Parameters:
securityOpt- Security configuration when running the docker container.- Returns:
this
-
user
Sets the value ofDockerRunOptions.getUser()- Parameters:
user- The user to use when running the container.- Returns:
this
-
volumes
Sets the value ofDockerRunOptions.getVolumes()- Parameters:
volumes- Docker volumes to mount.- Returns:
this
-
workingDirectory
Sets the value ofDockerRunOptions.getWorkingDirectory()- Parameters:
workingDirectory- Working directory inside the container.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<DockerRunOptions>- Returns:
- a new instance of
DockerRunOptions - Throws:
NullPointerException- if any required attribute was not provided
-