Package software.amazon.awscdk
Class DockerRunOptions.Builder
java.lang.Object
software.amazon.awscdk.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()Sets the value ofDockerRunOptions.getNetwork()Sets the value ofDockerRunOptions.getPlatform()securityOpt(String securityOpt) Sets the value ofDockerRunOptions.getSecurityOpt()Sets the value ofDockerRunOptions.getUser()volumes(List<? extends DockerVolume> volumes) Sets the value ofDockerRunOptions.getVolumes()volumesFrom(List<String> volumesFrom) Sets the value ofDockerRunOptions.getVolumesFrom()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
-
network
Sets the value ofDockerRunOptions.getNetwork()- Parameters:
network- Docker Networking options.- Returns:
this
-
platform
Sets the value ofDockerRunOptions.getPlatform()- Parameters:
platform- Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. Example value:linux/amd64- 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
-
volumesFrom
Sets the value ofDockerRunOptions.getVolumesFrom()- Parameters:
volumesFrom- Where to mount the specified volumes from.- 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
-