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.98.0 (build 00b106d)", date="2024-05-08T21:35:01.584Z") @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();
 
  • Method Details

    • getCommand

      @Stability(Stable) @Nullable default List<String> getCommand()
      The command to run in the container.

      Default: - run the command defined in the image

    • getEntrypoint

      @Stability(Stable) @Nullable default List<String> getEntrypoint()
      The entrypoint to run in the container.

      Default: - run the entrypoint defined in the image

    • getEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getEnvironment()
      The environment variables to pass to the container.

      Default: - no environment variables.

    • getNetwork

      @Stability(Stable) @Nullable default String getNetwork()
      Docker Networking options.

      Default: - no networking options

    • getPlatform

      @Stability(Stable) @Nullable default String getPlatform()
      Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.

      Example value: linux/amd64

      Default: - no platform specified

    • getSecurityOpt

      @Stability(Stable) @Nullable default String getSecurityOpt()
      Security configuration when running the docker container.

      Default: - no security options

    • getUser

      @Stability(Stable) @Nullable default String getUser()
      The user to use when running the container.

      Default: - root or image default

    • getVolumes

      @Stability(Stable) @Nullable default List<DockerVolume> getVolumes()
      Docker volumes to mount.

      Default: - no volumes are mounted

    • getVolumesFrom

      @Stability(Stable) @Nullable default List<String> getVolumesFrom()
      Where to mount the specified volumes from.

      Default: - no containers are specified to mount volumes from

      See Also:
    • getWorkingDirectory

      @Stability(Stable) @Nullable default String getWorkingDirectory()
      Working directory inside the container.

      Default: - image default

    • builder

      @Stability(Stable) static DockerRunOptions.Builder builder()
      Returns:
      a DockerRunOptions.Builder of DockerRunOptions