Class DockerRunOptions
Docker run options.
Inheritance
Implements
Namespace: Amazon.CDK
Assembly: Amazon.CDK.dll
Syntax (csharp)
public class DockerRunOptions : Object, IDockerRunOptions
Syntax (vb)
Public Class DockerRunOptions
Inherits Object
Implements IDockerRunOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var dockerRunOptions = new DockerRunOptions {
Command = new [] { "command" },
Entrypoint = new [] { "entrypoint" },
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
SecurityOpt = "securityOpt",
User = "user",
Volumes = new [] { new DockerVolume {
ContainerPath = "containerPath",
HostPath = "hostPath",
// the properties below are optional
Consistency = DockerVolumeConsistency.CONSISTENT
} },
WorkingDirectory = "workingDirectory"
};
Synopsis
Constructors
DockerRunOptions() |
Properties
Command | The command to run in the container. |
Entrypoint | The entrypoint to run in the container. |
Environment | The environment variables to pass to the container. |
SecurityOpt | Security configuration when running the docker container. |
User | The user to use when running the container. |
Volumes | Docker volumes to mount. |
WorkingDirectory | Working directory inside the container. |
Constructors
DockerRunOptions()
public DockerRunOptions()
Properties
Command
The command to run in the container.
public string[] Command { get; set; }
Property Value
System.String[]
Remarks
Default: - run the command defined in the image
Entrypoint
The entrypoint to run in the container.
public string[] Entrypoint { get; set; }
Property Value
System.String[]
Remarks
Default: - run the entrypoint defined in the image
Environment
The environment variables to pass to the container.
public IDictionary<string, string> Environment { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - no environment variables.
SecurityOpt
Security configuration when running the docker container.
public string SecurityOpt { get; set; }
Property Value
System.String
Remarks
Default: - no security options
User
The user to use when running the container.
public string User { get; set; }
Property Value
System.String
Remarks
Default: - root or image default
Volumes
Docker volumes to mount.
public IDockerVolume[] Volumes { get; set; }
Property Value
Remarks
Default: - no volumes are mounted
WorkingDirectory
Working directory inside the container.
public string WorkingDirectory { get; set; }
Property Value
System.String
Remarks
Default: - image default