Package software.amazon.awscdk
Interface DockerRunOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
BundlingOptions,BundlingOptions,BundlingOptions
- All Known Implementing Classes:
BundlingOptions.Jsii$Proxy,BundlingOptions.Jsii$Proxy,BundlingOptions.Jsii$Proxy,DockerRunOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-12T17:54:04.186Z")
@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.*;
DockerRunOptions dockerRunOptions = DockerRunOptions.builder()
.command(List.of("command"))
.entrypoint(List.of("entrypoint"))
.environment(Map.of(
"environmentKey", "environment"))
.network("network")
.platform("platform")
.securityOpt("securityOpt")
.user("user")
.volumes(List.of(DockerVolume.builder()
.containerPath("containerPath")
.hostPath("hostPath")
// the properties below are optional
.consistency(DockerVolumeConsistency.CONSISTENT)
.build()))
.volumesFrom(List.of("volumesFrom"))
.workingDirectory("workingDirectory")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDockerRunOptionsstatic final classAn implementation forDockerRunOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic DockerRunOptions.Builderbuilder()The command to run in the container.The entrypoint to run in the container.The environment variables to pass to the container.default StringDocker Networking options.default StringSet platform if server is multi-platform capable.default StringSecurity configuration when running the docker container.default StringgetUser()The user to use when running the container.default List<DockerVolume> Docker volumes to mount.Where to mount the specified volumes from.default StringWorking 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.
-
getNetwork
Docker Networking options.Default: - no networking options
-
getPlatform
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.Example value:
linux/amd64Default: - no platform specified
-
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
-
getVolumesFrom
Where to mount the specified volumes from.Default: - no containers are specified to mount volumes from
- See Also:
-
getWorkingDirectory
Working directory inside the container.Default: - image default
-
builder
- Returns:
- a
DockerRunOptions.BuilderofDockerRunOptions
-