Skip to content

DockerRunOptions

Docker run options.

Initializer

using AlibabaCloud.SDK.ROS.CDK.Core;
new DockerRunOptions {
    string[] Command = null,
    string[] Entrypoint = null,
    System.Collections.Generic.IDictionary<string, string> Environment = null,
    string Network = null,
    string Platform = null,
    string SecurityOpt = null,
    string User = null,
    DockerVolume[] Volumes = null,
    string[] VolumesFrom = null,
    string WorkingDirectory = null
};

Properties

Name Type Description
Command string[] The command to run in the container.
Entrypoint string[] The entrypoint to run in the container.
Environment System.Collections.Generic.IDictionary The environment variables to pass to the container.
Network string Docker Networking options.
Platform string Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
SecurityOpt string Security configuration when running the docker container.
User string The user to use when running the container.
Volumes DockerVolume[] Docker volumes to mount.
VolumesFrom string[] Where to mount the specified volumes from.
WorkingDirectory string Working directory inside the container.

CommandOptional

public string[] Command { get; set; }
  • Type: string[]
  • Default: run the command defined in the image

The command to run in the container.


EntrypointOptional

public string[] Entrypoint { get; set; }
  • Type: string[]
  • Default: run the entrypoint defined in the image

The entrypoint to run in the container.


EnvironmentOptional

public System.Collections.Generic.IDictionary<string, string> Environment { get; set; }
  • Type: System.Collections.Generic.IDictionary
  • Default: no environment variables.

The environment variables to pass to the container.


NetworkOptional

public string Network { get; set; }
  • Type: string
  • Default: no networking options

Docker Networking options.


PlatformOptional

public string Platform { get; set; }
  • Type: 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 string SecurityOpt { get; set; }
  • Type: string
  • Default: no security options

Security configuration when running the docker container.


UserOptional

public string User { get; set; }
  • Type: string
  • Default: root or image default

The user to use when running the container.


VolumesOptional

public DockerVolume[] Volumes { get; set; }

Docker volumes to mount.


VolumesFromOptional

public string[] VolumesFrom { get; set; }
  • Type: string[]
  • 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 string WorkingDirectory { get; set; }
  • Type: string
  • Default: image default

Working directory inside the container.