Skip to content

DockerRunOptions

Docker run options.

Initializer

import com.aliyun.ros.cdk.core.DockerRunOptions;
DockerRunOptions.builder()
//  .command(java.util.List<java.lang.String>)
//  .entrypoint(java.util.List<java.lang.String>)
//  .environment(java.util.Map<java.lang.String, java.lang.String>)
//  .network(java.lang.String)
//  .platform(java.lang.String)
//  .securityOpt(java.lang.String)
//  .user(java.lang.String)
//  .volumes(java.util.List<DockerVolume>)
//  .volumesFrom(java.util.List<java.lang.String>)
//  .workingDirectory(java.lang.String)
    .build();

Properties

Name Type Description
command java.util.List The command to run in the container.
entrypoint java.util.List The entrypoint to run in the container.
environment java.util.Map The environment variables to pass to the container.
network java.lang.String Docker Networking options.
platform java.lang.String Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
securityOpt java.lang.String Security configuration when running the docker container.
user java.lang.String The user to use when running the container.
volumes java.util.List<DockerVolume> Docker volumes to mount.
volumesFrom java.util.List Where to mount the specified volumes from.
workingDirectory java.lang.String Working directory inside the container.

commandOptional

public java.util.List<java.lang.String> getCommand();
  • Type: java.util.List
  • Default: run the command defined in the image

The command to run in the container.


entrypointOptional

public java.util.List<java.lang.String> getEntrypoint();
  • Type: java.util.List
  • Default: run the entrypoint defined in the image

The entrypoint to run in the container.


environmentOptional

public java.util.Map<java.lang.String, java.lang.String> getEnvironment();
  • Type: java.util.Map
  • Default: no environment variables.

The environment variables to pass to the container.


networkOptional

public java.lang.String getNetwork();
  • Type: java.lang.String
  • Default: no networking options

Docker Networking options.


platformOptional

public java.lang.String getPlatform();
  • Type: java.lang.String
  • Default: no platform specified

Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.

Example value: linux/amd64


securityOptOptional

public java.lang.String getSecurityOpt();
  • Type: java.lang.String
  • Default: no security options

Security configuration when running the docker container.


userOptional

public java.lang.String getUser();
  • Type: java.lang.String
  • Default: root or image default

The user to use when running the container.


volumesOptional

public java.util.List<DockerVolume> getVolumes();
  • Type: java.util.List<DockerVolume>
  • Default: no volumes are mounted

Docker volumes to mount.


volumesFromOptional

public java.util.List<java.lang.String> getVolumesFrom();
  • Type: java.util.List
  • Default: no containers are specified to mount volumes from

Where to mount the specified volumes from.

https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from


workingDirectoryOptional

public java.lang.String getWorkingDirectory();
  • Type: java.lang.String
  • Default: image default

Working directory inside the container.