interface DockerRunOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.DockerRunOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2#DockerRunOptions |
![]() | software.amazon.awscdk.DockerRunOptions |
![]() | aws_cdk.DockerRunOptions |
![]() | aws-cdk-lib » 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-lib';
const dockerRunOptions: cdk.DockerRunOptions = {
command: ['command'],
entrypoint: ['entrypoint'],
environment: {
environmentKey: 'environment',
},
network: 'network',
platform: 'platform',
securityOpt: 'securityOpt',
user: 'user',
volumes: [{
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
}],
volumesFrom: ['volumesFrom'],
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. |
network? | string | Docker Networking options. |
platform? | string | Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+. |
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. |
volumes | string[] | Where to mount the specified volumes from. |
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.
network?
Type:
string
(optional, default: no networking options)
Docker Networking options.
platform?
Type:
string
(optional, default: no platform specified)
Set platform if server is multi-platform capable. Requires Docker Engine API v1.38+.
Example value: linux/amd64
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.
volumesFrom?
Type:
string[]
(optional, default: no containers are specified to mount volumes from)
Where to mount the specified volumes from.
workingDirectory?
Type:
string
(optional, default: image default)
Working directory inside the container.