Mount

@Serializable
data class Mount(val target: String? = null, val source: String? = null, val type: Mount.Type? = null, val readOnly: Boolean? = null, val consistency: String? = null, val bindOptions: MountBindOptions? = null, val volumeOptions: MountVolumeOptions? = null, val imageOptions: MountImageOptions? = null, val tmpfsOptions: MountTmpfsOptions? = null)

Parameters

target

Container path.

source

Mount source (e.g. a volume name, a host path).

type

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. - image Mounts an image. - 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

readOnly

Whether the mount should be read-only.

consistency

The consistency requirement for the mount: default, consistent, cached, or delegated.

bindOptions
volumeOptions
imageOptions
tmpfsOptions

Constructors

Link copied to clipboard
constructor(target: String? = null, source: String? = null, type: Mount.Type? = null, readOnly: Boolean? = null, consistency: String? = null, bindOptions: MountBindOptions? = null, volumeOptions: MountVolumeOptions? = null, imageOptions: MountImageOptions? = null, tmpfsOptions: MountTmpfsOptions? = null)

Types

Link copied to clipboard
@Serializable
enum Type : Enum<Mount.Type>

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. - image Mounts an image. - 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

Properties

Link copied to clipboard
@SerialName(value = "BindOptions")
val bindOptions: MountBindOptions?
Link copied to clipboard
@SerialName(value = "Consistency")
val consistency: String?
Link copied to clipboard
@SerialName(value = "ImageOptions")
val imageOptions: MountImageOptions?
Link copied to clipboard
@SerialName(value = "ReadOnly")
val readOnly: Boolean?
Link copied to clipboard
@SerialName(value = "Source")
val source: String?
Link copied to clipboard
@SerialName(value = "Target")
val target: String?
Link copied to clipboard
@SerialName(value = "TmpfsOptions")
val tmpfsOptions: MountTmpfsOptions?
Link copied to clipboard
@SerialName(value = "Type")
val type: Mount.Type?
Link copied to clipboard
@SerialName(value = "VolumeOptions")
val volumeOptions: MountVolumeOptions?