interface DockerVolume
Language | Type name |
---|---|
.NET | Amazon.CDK.DockerVolume |
Java | software.amazon.awscdk.core.DockerVolume |
Python | aws_cdk.core.DockerVolume |
TypeScript (source) | @aws-cdk/core » 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/core';
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