Package software.amazon.awscdk.core
Interface DockerRunOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DockerRunOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:55.027Z")
@Stability(Stable)
public interface DockerRunOptions
extends software.amazon.jsii.JsiiSerializable
Docker run options.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.core.*; DockerRunOptions dockerRunOptions = DockerRunOptions.builder() .command(List.of("command")) .entrypoint(List.of("entrypoint")) .environment(Map.of( "environmentKey", "environment")) .securityOpt("securityOpt") .user("user") .volumes(List.of(DockerVolume.builder() .containerPath("containerPath") .hostPath("hostPath") // the properties below are optional .consistency(DockerVolumeConsistency.CONSISTENT) .build())) .workingDirectory("workingDirectory") .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forDockerRunOptions
static final class
An implementation forDockerRunOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic DockerRunOptions.Builder
builder()
The command to run in the container.The entrypoint to run in the container.The environment variables to pass to the container.default String
Security configuration when running the docker container.default String
getUser()
The user to use when running the container.default List<DockerVolume>
Docker volumes to mount.default String
Working directory inside the container.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCommand
The command to run in the container.Default: - run the command defined in the image
-
getEntrypoint
The entrypoint to run in the container.Default: - run the entrypoint defined in the image
-
getEnvironment
The environment variables to pass to the container.Default: - no environment variables.
-
getSecurityOpt
Security configuration when running the docker container.Default: - no security options
-
getUser
The user to use when running the container.Default: - root or image default
-
getVolumes
Docker volumes to mount.Default: - no volumes are mounted
-
getWorkingDirectory
Working directory inside the container.Default: - image default
-
builder
- Returns:
- a
DockerRunOptions.Builder
ofDockerRunOptions
-