Class DockerVolume
A Docker volume.
Implements
Inherited Members
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DockerVolume : IDockerVolume
Syntax (vb)
Public Class DockerVolume Implements IDockerVolume
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 dockerVolume = new DockerVolume {
ContainerPath = "containerPath",
HostPath = "hostPath",
// the properties below are optional
Consistency = DockerVolumeConsistency.CONSISTENT
};
Synopsis
Constructors
| DockerVolume() | A Docker volume. |
Properties
| Consistency | Mount consistency. |
| ContainerPath | The path where the file or directory is mounted in the container. |
| HostPath | The path to the file or directory on the host machine. |
Constructors
DockerVolume()
A Docker volume.
public DockerVolume()
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 dockerVolume = new DockerVolume {
ContainerPath = "containerPath",
HostPath = "hostPath",
// the properties below are optional
Consistency = DockerVolumeConsistency.CONSISTENT
};
Properties
Consistency
Mount consistency.
public DockerVolumeConsistency? Consistency { get; set; }
Property Value
Remarks
Only applicable for macOS
Default: DockerConsistency.DELEGATED
See: https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos
ContainerPath
The path where the file or directory is mounted in the container.
public string ContainerPath { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
HostPath
The path to the file or directory on the host machine.
public string HostPath { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated