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. |
containerPath
Required
public java.lang.String getContainerPath();
- Type: java.lang.String
The path where the file or directory is mounted in the container.
hostPath
Required
public java.lang.String getHostPath();
- Type: java.lang.String
The path to the file or directory on the host machine.
consistency
Optional
public DockerVolumeConsistency getConsistency();
- Type: DockerVolumeConsistency
- Default: DockerConsistency.DELEGATED
Mount consistency.
Only applicable for macOS
https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos