@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.891Z") @Stability(value=Stable) public interface DockerRunOptions extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
DockerRunOptions dockerRunOptions = DockerRunOptions.builder()
.command(List.of("command"))
.entrypoint(List.of("entrypoint"))
.environment(Map.of(
"environmentKey", "environment"))
.network("network")
.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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
DockerRunOptions.Builder
A builder for
DockerRunOptions |
static class |
DockerRunOptions.Jsii$Proxy
An implementation for
DockerRunOptions |
| Modifier and Type | Method and Description |
|---|---|
static DockerRunOptions.Builder |
builder() |
default List<String> |
getCommand()
The command to run in the container.
|
default List<String> |
getEntrypoint()
The entrypoint to run in the container.
|
default Map<String,String> |
getEnvironment()
The environment variables to pass to the container.
|
default String |
getNetwork()
Docker [Networking options](https://docs.docker.com/engine/reference/commandline/run/#connect-a-container-to-a-network---network).
|
default String |
getSecurityOpt()
[Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
|
default String |
getUser()
The user to use when running the container.
|
default List<DockerVolume> |
getVolumes()
Docker volumes to mount.
|
default String |
getWorkingDirectory()
Working directory inside the container.
|
@Stability(value=Stable) @Nullable default List<String> getCommand()
Default: - run the command defined in the image
@Stability(value=Stable) @Nullable default List<String> getEntrypoint()
Default: - run the entrypoint defined in the image
@Stability(value=Stable) @Nullable default Map<String,String> getEnvironment()
Default: - no environment variables.
@Stability(value=Stable) @Nullable default String getNetwork()
Default: - no networking options
@Stability(value=Stable) @Nullable default String getSecurityOpt()
Default: - no security options
@Stability(value=Stable) @Nullable default String getUser()
Default: - root or image default
@Stability(value=Stable) @Nullable default List<DockerVolume> getVolumes()
Default: - no volumes are mounted
@Stability(value=Stable) @Nullable default String getWorkingDirectory()
Default: - image default
@Stability(value=Stable) static DockerRunOptions.Builder builder()
DockerRunOptions.Builder of DockerRunOptionsCopyright © 2022. All rights reserved.