pub struct MountPoint {
pub source: Option<String>,
pub destination: Option<String>,
pub rw: Option<bool>,
pub name: Option<String>,
pub driver: Option<String>,
pub mount_type: Option<MountType>,
pub mode: Option<String>,
pub propagation: Option<MountPropagation>,
pub id: Option<String>,
pub spec: Option<Mount>,
pub skip_mountpoint_creation: Option<bool>,
pub active: Option<i32>,
}
Expand description
MountPoint is the intersection point between a volume and a container. It specifies which volume is to be used and where inside a container it should be mounted.
Note that this type is embedded in container.Container
object and persisted to disk.
Changes to this struct need to by synced with on disk state.
Fields§
§source: Option<String>
Source is the source path of the mount.
E.g. mount --bind /foo /bar
, /foo
is the Source
.
destination: Option<String>
Destination is the path relative to the container root (/
) to the mount point
It is where the Source
is mounted to.
rw: Option<bool>
RW is set to true when the mountpoint should be mounted as read-write.
name: Option<String>
Name is the name reference to the underlying data defined by Source
e.g., the volume name.
driver: Option<String>
Driver is the volume driver used to create the volume (if it is a volume).
mount_type: Option<MountType>
§mode: Option<String>
mode is the comma separated list of options supplied by the user when creating the bind/volume mount. Note mode is not used on Windows
propagation: Option<MountPropagation>
Propagation describes how the mounts are propagated from the host into the mount point, and vice-versa. See https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt Note Propagation is not used on Windows
id: Option<String>
ID is the opaque ID used to pass to the volume driver.
This should be set by calls to Mount
and unset by calls to Unmount
spec: Option<Mount>
Spec is a copy of the API request that created this mount.
skip_mountpoint_creation: Option<bool>
Some bind mounts should not be automatically created. (Some are auto-created for backwards-compatibility) This is checked on the API but setting this here prevents race conditions. where a bind dir existed during validation was removed before reaching the setup code.
active: Option<i32>
Track usage of this mountpoint
Specifically needed for containers which are running and calls to docker cp
because both these actions require mounting the volumes.
Trait Implementations§
Source§impl Clone for MountPoint
impl Clone for MountPoint
Source§fn clone(&self) -> MountPoint
fn clone(&self) -> MountPoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more