DockerVolume

class aws_cdk.DockerVolume(*, container_path, host_path, consistency=None)

Bases: object

A Docker volume.

Parameters:
  • container_path (str) – The path where the file or directory is mounted in the container.

  • host_path (str) – The path to the file or directory on the host machine.

  • consistency (Optional[DockerVolumeConsistency]) – Mount consistency. Only applicable for macOS Default: DockerConsistency.DELEGATED

ExampleMetadata:

fixture=_generated

Example:

# 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
)

Attributes

consistency

Mount consistency.

Only applicable for macOS

Default:

DockerConsistency.DELEGATED

See:

https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos

container_path

The path where the file or directory is mounted in the container.

host_path

The path to the file or directory on the host machine.