Mount
Table of Contents
- $bindOptions : MountBindOptions|null
- Optional configuration for the `bind` type.
- $consistency : string|null
- The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
- $readOnly : bool|null
- Whether the mount should be read-only.
- $source : string|null
- Mount source (e.g. a volume name, a host path).
- $target : string|null
- Container path.
- $tmpfsOptions : MountTmpfsOptions|null
- Optional configuration for the `tmpfs` type.
- $type : string|null
- The mount type. Available types:.
- $volumeOptions : MountVolumeOptions|null
- Optional configuration for the `volume` type.
- getBindOptions() : MountBindOptions|null
- Optional configuration for the `bind` type.
- getConsistency() : string|null
- The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
- getReadOnly() : bool|null
- Whether the mount should be read-only.
- getSource() : string|null
- Mount source (e.g. a volume name, a host path).
- getTarget() : string|null
- Container path.
- getTmpfsOptions() : MountTmpfsOptions|null
- Optional configuration for the `tmpfs` type.
- getType() : string|null
- The mount type. Available types:.
- getVolumeOptions() : MountVolumeOptions|null
- Optional configuration for the `volume` type.
- setBindOptions() : self
- Optional configuration for the `bind` type.
- setConsistency() : self
- The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
- setReadOnly() : self
- Whether the mount should be read-only.
- setSource() : self
- Mount source (e.g. a volume name, a host path).
- setTarget() : self
- Container path.
- setTmpfsOptions() : self
- Optional configuration for the `tmpfs` type.
- setType() : self
- The mount type. Available types:.
- setVolumeOptions() : self
- Optional configuration for the `volume` type.
Properties
$bindOptions
Optional configuration for the `bind` type.
protected
MountBindOptions|null
$bindOptions
$consistency
The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
protected
string|null
$consistency
$readOnly
Whether the mount should be read-only.
protected
bool|null
$readOnly
$source
Mount source (e.g. a volume name, a host path).
protected
string|null
$source
$target
Container path.
protected
string|null
$target
$tmpfsOptions
Optional configuration for the `tmpfs` type.
protected
MountTmpfsOptions|null
$tmpfsOptions
$type
The mount type. Available types:.
protected
string|null
$type
-
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.
$volumeOptions
Optional configuration for the `volume` type.
protected
MountVolumeOptions|null
$volumeOptions
Methods
getBindOptions()
Optional configuration for the `bind` type.
public
getBindOptions() : MountBindOptions|null
Return values
MountBindOptions|null —getConsistency()
The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
public
getConsistency() : string|null
Return values
string|null —getReadOnly()
Whether the mount should be read-only.
public
getReadOnly() : bool|null
Return values
bool|null —getSource()
Mount source (e.g. a volume name, a host path).
public
getSource() : string|null
Return values
string|null —getTarget()
Container path.
public
getTarget() : string|null
Return values
string|null —getTmpfsOptions()
Optional configuration for the `tmpfs` type.
public
getTmpfsOptions() : MountTmpfsOptions|null
Return values
MountTmpfsOptions|null —getType()
The mount type. Available types:.
public
getType() : string|null
-
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.
Return values
string|null —getVolumeOptions()
Optional configuration for the `volume` type.
public
getVolumeOptions() : MountVolumeOptions|null
Return values
MountVolumeOptions|null —setBindOptions()
Optional configuration for the `bind` type.
public
setBindOptions(MountBindOptions|null $bindOptions) : self
Parameters
- $bindOptions : MountBindOptions|null
Return values
self —setConsistency()
The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
public
setConsistency(string|null $consistency) : self
Parameters
- $consistency : string|null
Return values
self —setReadOnly()
Whether the mount should be read-only.
public
setReadOnly(bool|null $readOnly) : self
Parameters
- $readOnly : bool|null
Return values
self —setSource()
Mount source (e.g. a volume name, a host path).
public
setSource(string|null $source) : self
Parameters
- $source : string|null
Return values
self —setTarget()
Container path.
public
setTarget(string|null $target) : self
Parameters
- $target : string|null
Return values
self —setTmpfsOptions()
Optional configuration for the `tmpfs` type.
public
setTmpfsOptions(MountTmpfsOptions|null $tmpfsOptions) : self
Parameters
- $tmpfsOptions : MountTmpfsOptions|null
Return values
self —setType()
The mount type. Available types:.
public
setType(string|null $type) : self
-
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.
Parameters
- $type : string|null
Return values
self —setVolumeOptions()
Optional configuration for the `volume` type.
public
setVolumeOptions(MountVolumeOptions|null $volumeOptions) : self
Parameters
- $volumeOptions : MountVolumeOptions|null