interface DockerVolume
Language | Type name |
---|---|
.NET | Amazon.CDK.DockerVolume |
Go | github.com/aws/aws-cdk-go/awscdk/v2#DockerVolume |
Java | software.amazon.awscdk.DockerVolume |
Python | aws_cdk.DockerVolume |
TypeScript (source) | aws-cdk-lib » DockerVolume |
A Docker volume.
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 dockerVolume: cdk.DockerVolume = {
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
};
Properties
Name | Type | Description |
---|---|---|
container | string | The path where the file or directory is mounted in the container. |
host | string | The path to the file or directory on the host machine. |
consistency? | Docker | Mount consistency. |
containerPath
Type:
string
The path where the file or directory is mounted in the container.
hostPath
Type:
string
The path to the file or directory on the host machine.
consistency?
Type:
Docker
(optional, default: DockerConsistency.DELEGATED)
Mount consistency.
Only applicable for macOS
See also: https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos