Skip to content

dsdk / v1.47 / Mount

Type Alias: Mount ​

Mount: object

Type declaration ​

NameTypeDescription
BindOptions?objectOptional configuration for the bind type.
BindOptions.CreateMountpoint?booleanCreate mount point on host if missing
BindOptions.NonRecursive?booleanDisable recursive bind mount.
BindOptions.Propagation?"private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave"A propagation mode with the value [r]private, [r]shared, or [r]slave.
BindOptions.ReadOnlyForceRecursive?booleanRaise an error if the mount cannot be made recursively read-only.
BindOptions.ReadOnlyNonRecursive?booleanMake the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to true in conjunction). Added in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to true for clients on versions prior to v1.44.
Consistency?stringThe consistency requirement for the mount: default, consistent, cached, or delegated.
ReadOnly?booleanWhether the mount should be read-only.
Source?stringMount source (e.g. a volume name, a host path).
Target?stringContainer path.
TmpfsOptions?objectOptional configuration for the tmpfs type.
TmpfsOptions.Mode?numberThe permission mode for the tmpfs mount in an integer.
TmpfsOptions.Options?string[][]The options to be passed to the tmpfs mount. An array of arrays. Flag options should be provided as 1-length arrays. Other types should be provided as as 2-length arrays, where the first item is the key and the second the value.
TmpfsOptions.SizeBytes?numberThe size for the tmpfs mount in bytes.
Type?"bind" | "volume" | "tmpfs" | "npipe" | "cluster"The mount type. Available types: - bind Mounts a file or directory from the host into the container. Must exist prior to creating the container. - volume Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are not removed when the container is removed. - tmpfs Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - npipe Mounts a named pipe from the host into the container. Must exist prior to creating the container. - cluster a Swarm cluster volume
VolumeOptions?objectOptional configuration for the volume type.
VolumeOptions.DriverConfig?objectMap of driver specific options
VolumeOptions.DriverConfig.Name?stringName of the driver to use to create the volume.
VolumeOptions.DriverConfig.Options?objectkey/value map of driver specific options.
VolumeOptions.Labels?objectUser-defined key/value metadata.
VolumeOptions.NoCopy?booleanPopulate volume with data from the target.
VolumeOptions.Subpath?stringSource path inside the volume. Must be relative without any back traversals.