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();
 
  • 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.

    • 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

    • 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