Skip to content

DockerVolume

A Docker volume.

Initializer

import { DockerVolume } from '@alicloud/ros-cdk-core'
const dockerVolume: DockerVolume = { ... }

Properties

Name Type Description
containerPath string The path where the file or directory is mounted in the container.
hostPath string The path to the file or directory on the host machine.
consistency DockerVolumeConsistency Mount consistency.

containerPathRequired

public readonly containerPath: string;
  • Type: string

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


hostPathRequired

public readonly hostPath: string;
  • Type: string

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


consistencyOptional

public readonly consistency: DockerVolumeConsistency;

Mount consistency.

Only applicable for macOS

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