Class DockerVolume
A Docker volume.
Inheritance
System.Object
DockerVolume
Implements
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DockerVolume : Object, IDockerVolume
Syntax (vb)
Public Class DockerVolume
Inherits Object
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() |
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()
public DockerVolume()
Properties
Consistency
Mount consistency.
public Nullable<DockerVolumeConsistency> Consistency { get; set; }
Property Value
System.Nullable<DockerVolumeConsistency>
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
System.String
HostPath
The path to the file or directory on the host machine.
public string HostPath { get; set; }
Property Value
System.String