Skip to content

DockerVolume

A Docker volume.

Initializer

import com.aliyun.ros.cdk.core.DockerVolume;
DockerVolume.builder()
    .containerPath(java.lang.String)
    .hostPath(java.lang.String)
//  .consistency(DockerVolumeConsistency)
    .build();

Properties

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

containerPathRequired

public java.lang.String getContainerPath();
  • Type: java.lang.String

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


hostPathRequired

public java.lang.String getHostPath();
  • Type: java.lang.String

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


consistencyOptional

public DockerVolumeConsistency getConsistency();

Mount consistency.

Only applicable for macOS

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