# DockerVolume

A Docker volume.

- Source: [`core/lib/bundling.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/core/lib/bundling.ts#L593)

## Example

TypeScript:

```ts
// 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,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

docker_volume = cdk.DockerVolume(
    container_path="containerPath",
    host_path="hostPath",

    # the properties below are optional
    consistency=cdk.DockerVolumeConsistency.CONSISTENT
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

DockerVolume dockerVolume = DockerVolume.builder()
        .containerPath("containerPath")
        .hostPath("hostPath")

        // the properties below are optional
        .consistency(DockerVolumeConsistency.CONSISTENT)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

dockerVolume := &DockerVolume{
	ContainerPath: jsii.String("containerPath"),
	HostPath: jsii.String("hostPath"),

	// the properties below are optional
	Consistency: cdk.DockerVolumeConsistency_CONSISTENT,
}
```

## Properties

- `consistency`: [DockerVolumeConsistency](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.DockerVolumeConsistency.html) = DockerConsistency.DELEGATED — Mount consistency.

  Only applicable for macOS

- `containerPath`: string (required) — The path where the file or directory is mounted in the container.

- `hostPath`: string (required) — The path to the file or directory on the host machine.
