@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:22.551Z") @Stability(value=Experimental) 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.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();
| 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()
(experimental) The command to run in the container.
|
default List<String> |
getEntrypoint()
(experimental) The entrypoint to run in the container.
|
default Map<String,String> |
getEnvironment()
(experimental) The environment variables to pass to the container.
|
default String |
getSecurityOpt()
(experimental) [Security configuration](https://docs.docker.com/engine/reference/run/#security-configuration) when running the docker container.
|
default String |
getUser()
(experimental) The user to use when running the container.
|
default List<DockerVolume> |
getVolumes()
(experimental) Docker volumes to mount.
|
default String |
getWorkingDirectory()
(experimental) Working directory inside the container.
|
@Stability(value=Experimental) @Nullable default List<String> getCommand()
Default: - run the command defined in the image
@Stability(value=Experimental) @Nullable default List<String> getEntrypoint()
Default: - run the entrypoint defined in the image
@Stability(value=Experimental) @Nullable default Map<String,String> getEnvironment()
Default: - no environment variables.
@Stability(value=Experimental) @Nullable default String getSecurityOpt()
Default: - no security options
@Stability(value=Experimental) @Nullable default String getUser()
Default: - root or image default
@Stability(value=Experimental) @Nullable default List<DockerVolume> getVolumes()
Default: - no volumes are mounted
@Stability(value=Experimental) @Nullable default String getWorkingDirectory()
Default: - image default
@Stability(value=Experimental) static DockerRunOptions.Builder builder()
DockerRunOptions.Builder of DockerRunOptionsCopyright © 2022. All rights reserved.