interface DockerRunOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.DockerRunOptions |
Java | software.amazon.awscdk.core.DockerRunOptions |
Python | aws_cdk.core.DockerRunOptions |
TypeScript (source) | @aws-cdk/core » DockerRunOptions |
Docker run options.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from '@aws-cdk/core';
const dockerRunOptions: cdk.DockerRunOptions = {
command: ['command'],
entrypoint: ['entrypoint'],
environment: {
environmentKey: 'environment',
},
securityOpt: 'securityOpt',
user: 'user',
volumes: [{
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
}],
workingDirectory: 'workingDirectory',
};
Properties
| Name | Type | Description |
|---|---|---|
| command? | string[] | The command to run in the container. |
| entrypoint? | string[] | The entrypoint to run in the container. |
| environment? | { [string]: string } | The environment variables to pass to the container. |
| security | string | Security configuration when running the docker container. |
| user? | string | The user to use when running the container. |
| volumes? | Docker[] | Docker volumes to mount. |
| working | string | Working directory inside the container. |
command?
Type:
string[]
(optional, default: run the command defined in the image)
The command to run in the container.
entrypoint?
Type:
string[]
(optional, default: run the entrypoint defined in the image)
The entrypoint to run in the container.
environment?
Type:
{ [string]: string }
(optional, default: no environment variables.)
The environment variables to pass to the container.
securityOpt?
Type:
string
(optional, default: no security options)
Security configuration when running the docker container.
user?
Type:
string
(optional, default: root or image default)
The user to use when running the container.
volumes?
Type:
Docker[]
(optional, default: no volumes are mounted)
Docker volumes to mount.
workingDirectory?
Type:
string
(optional, default: image default)
Working directory inside the container.

.NET
Java
Python
TypeScript (