Schema
Type:
object
BindOptions
Type:
object
bind type.CreateMountpoint
Type:
boolean
All schema constraints and annotations
{
"default": false,
"description": "Create mount point on host if missing",
"type": "boolean"
}NonRecursive
Type:
boolean
All schema constraints and annotations
{
"default": false,
"description": "Disable recursive bind mount.",
"type": "boolean"
}Propagation
Type:
string
[r]private, [r]shared, or [r]slave.All schema constraints and annotations
{
"description": "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.",
"enum": [
"private",
"rprivate",
"shared",
"rshared",
"slave",
"rslave"
],
"type": "string"
}ReadOnlyForceRecursive
Type:
boolean
All schema constraints and annotations
{
"default": false,
"description": "Raise an error if the mount cannot be made recursively read-only.",
"type": "boolean"
}ReadOnlyNonRecursive
Type:
boolean
Make 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.
All schema constraints and annotations
{
"default": false,
"description": "Make the mount non-recursively read-only, but still leave the mount recursive\n(unless NonRecursive is set to `true` in conjunction).\n\nAdded in v1.44, before that version all read-only mounts were\nnon-recursive by default. To match the previous behaviour this\nwill default to `true` for clients on versions prior to v1.44.\n",
"type": "boolean"
}All schema constraints and annotations
{
"description": "Optional configuration for the `bind` type.",
"properties": {
"CreateMountpoint": {
"default": false,
"description": "Create mount point on host if missing",
"type": "boolean"
},
"NonRecursive": {
"default": false,
"description": "Disable recursive bind mount.",
"type": "boolean"
},
"Propagation": {
"description": "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.",
"enum": [
"private",
"rprivate",
"shared",
"rshared",
"slave",
"rslave"
],
"type": "string"
},
"ReadOnlyForceRecursive": {
"default": false,
"description": "Raise an error if the mount cannot be made recursively read-only.",
"type": "boolean"
},
"ReadOnlyNonRecursive": {
"default": false,
"description": "Make the mount non-recursively read-only, but still leave the mount recursive\n(unless NonRecursive is set to `true` in conjunction).\n\nAdded in v1.44, before that version all read-only mounts were\nnon-recursive by default. To match the previous behaviour this\nwill default to `true` for clients on versions prior to v1.44.\n",
"type": "boolean"
}
},
"type": "object"
}Consistency
Type:
string
default, consistent, cached, or delegated.All schema constraints and annotations
{
"description": "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.",
"type": "string"
}ImageOptions
Type:
object
image type.Subpath
Type:
string
All schema constraints and annotations
{
"description": "Source path inside the image. Must be relative without any back traversals.",
"example": "dir-inside-image/subdirectory",
"type": "string"
}All schema constraints and annotations
{
"description": "Optional configuration for the `image` type.",
"properties": {
"Subpath": {
"description": "Source path inside the image. Must be relative without any back traversals.",
"example": "dir-inside-image/subdirectory",
"type": "string"
}
},
"type": "object"
}ReadOnly
Type:
boolean
All schema constraints and annotations
{
"description": "Whether the mount should be read-only.",
"type": "boolean"
}Source
Type:
string
Mount source (e.g. a volume name, a host path). The source cannot be
specified when using Type=tmpfs. For Type=bind, the source path
must either exist, or the CreateMountpoint must be set to true to
create the source path on the host if missing.
For Type=npipe, the pipe must exist prior to creating the container.
All schema constraints and annotations
{
"description": "Mount source (e.g. a volume name, a host path). The source cannot be\nspecified when using `Type=tmpfs`. For `Type=bind`, the source path\nmust either exist, or the `CreateMountpoint` must be set to `true` to\ncreate the source path on the host if missing.\n\nFor `Type=npipe`, the pipe must exist prior to creating the container.",
"type": "string"
}Target
Type:
string
All schema constraints and annotations
{
"description": "Container path.",
"type": "string"
}TmpfsOptions
Type:
object
tmpfs type.Mode
Type:
integer
All schema constraints and annotations
{
"description": "The permission mode for the tmpfs mount in an integer.\nThe value must not be in octal format (e.g. 755) but rather\nthe decimal representation of the octal value (e.g. 493).\n",
"type": "integer"
}Options
Type:
array
Array item
Type:
array
All schema constraints and annotations
{
"items": {
"type": "string"
},
"maxItems": 2,
"minItems": 1,
"type": "array"
}All schema constraints and annotations
{
"description": "The options to be passed to the tmpfs mount. An array of arrays.\nFlag options should be provided as 1-length arrays. Other types\nshould be provided as as 2-length arrays, where the first item is\nthe key and the second the value.\n",
"example": [
[
"noexec"
]
],
"items": {
"items": {
"type": "string"
},
"maxItems": 2,
"minItems": 1,
"type": "array"
},
"type": "array"
}SizeBytes
Type:
integer
All schema constraints and annotations
{
"description": "The size for the tmpfs mount in bytes.",
"format": "int64",
"type": "integer"
}All schema constraints and annotations
{
"description": "Optional configuration for the `tmpfs` type.",
"properties": {
"Mode": {
"description": "The permission mode for the tmpfs mount in an integer.\nThe value must not be in octal format (e.g. 755) but rather\nthe decimal representation of the octal value (e.g. 493).\n",
"type": "integer"
},
"Options": {
"description": "The options to be passed to the tmpfs mount. An array of arrays.\nFlag options should be provided as 1-length arrays. Other types\nshould be provided as as 2-length arrays, where the first item is\nthe key and the second the value.\n",
"example": [
[
"noexec"
]
],
"items": {
"items": {
"type": "string"
},
"maxItems": 2,
"minItems": 1,
"type": "array"
},
"type": "array"
},
"SizeBytes": {
"description": "The size for the tmpfs mount in bytes.",
"format": "int64",
"type": "integer"
}
},
"type": "object"
}Type
The mount type. Available types:
bindMounts a file or directory from the host into the container. TheSourcemust exist prior to creating the container.clustera Swarm cluster volumeimageMounts an image.npipeMounts a named pipe from the host into the container. TheSourcemust exist prior to creating the container.tmpfsCreate a tmpfs with the given options. The mountSourcecannot be specified for tmpfs.volumeCreates 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.
All constraints apply
Schema:
MountType
All schema constraints and annotations
{
"allOf": [
{
"$ref": "#/components/schemas/MountType"
}
],
"description": "The mount type. Available types:\n\n- `bind` Mounts a file or directory from the host into the container. The `Source` must exist prior to creating the container.\n- `cluster` a Swarm cluster volume\n- `image` Mounts an image.\n- `npipe` Mounts a named pipe from the host into the container. The `Source` must exist prior to creating the container.\n- `tmpfs` Create a tmpfs with the given options. The mount `Source` cannot be specified for tmpfs.\n- `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.\n"
}VolumeOptions
Type:
object
volume type.DriverConfig
Type:
object
Name
Type:
string
All schema constraints and annotations
{
"description": "Name of the driver to use to create the volume.",
"type": "string"
}Options
Type:
object
All schema constraints and annotations
{
"additionalProperties": {
"type": "string"
},
"description": "key/value map of driver specific options.",
"type": "object"
}All schema constraints and annotations
{
"description": "Map of driver specific options",
"properties": {
"Name": {
"description": "Name of the driver to use to create the volume.",
"type": "string"
},
"Options": {
"additionalProperties": {
"type": "string"
},
"description": "key/value map of driver specific options.",
"type": "object"
}
},
"type": "object"
}Labels
Type:
object
All schema constraints and annotations
{
"additionalProperties": {
"type": "string"
},
"description": "User-defined key/value metadata.",
"type": "object"
}NoCopy
Type:
boolean
All schema constraints and annotations
{
"default": false,
"description": "Populate volume with data from the target.",
"type": "boolean"
}Subpath
Type:
string
All schema constraints and annotations
{
"description": "Source path inside the volume. Must be relative without any back traversals.",
"example": "dir-inside-volume/subdirectory",
"type": "string"
}All schema constraints and annotations
{
"description": "Optional configuration for the `volume` type.",
"properties": {
"DriverConfig": {
"description": "Map of driver specific options",
"properties": {
"Name": {
"description": "Name of the driver to use to create the volume.",
"type": "string"
},
"Options": {
"additionalProperties": {
"type": "string"
},
"description": "key/value map of driver specific options.",
"type": "object"
}
},
"type": "object"
},
"Labels": {
"additionalProperties": {
"type": "string"
},
"description": "User-defined key/value metadata.",
"type": "object"
},
"NoCopy": {
"default": false,
"description": "Populate volume with data from the target.",
"type": "boolean"
},
"Subpath": {
"description": "Source path inside the volume. Must be relative without any back traversals.",
"example": "dir-inside-volume/subdirectory",
"type": "string"
}
},
"type": "object"
}All schema constraints and annotations
{
"properties": {
"BindOptions": {
"description": "Optional configuration for the `bind` type.",
"properties": {
"CreateMountpoint": {
"default": false,
"description": "Create mount point on host if missing",
"type": "boolean"
},
"NonRecursive": {
"default": false,
"description": "Disable recursive bind mount.",
"type": "boolean"
},
"Propagation": {
"description": "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.",
"enum": [
"private",
"rprivate",
"shared",
"rshared",
"slave",
"rslave"
],
"type": "string"
},
"ReadOnlyForceRecursive": {
"default": false,
"description": "Raise an error if the mount cannot be made recursively read-only.",
"type": "boolean"
},
"ReadOnlyNonRecursive": {
"default": false,
"description": "Make the mount non-recursively read-only, but still leave the mount recursive\n(unless NonRecursive is set to `true` in conjunction).\n\nAdded in v1.44, before that version all read-only mounts were\nnon-recursive by default. To match the previous behaviour this\nwill default to `true` for clients on versions prior to v1.44.\n",
"type": "boolean"
}
},
"type": "object"
},
"Consistency": {
"description": "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.",
"type": "string"
},
"ImageOptions": {
"description": "Optional configuration for the `image` type.",
"properties": {
"Subpath": {
"description": "Source path inside the image. Must be relative without any back traversals.",
"example": "dir-inside-image/subdirectory",
"type": "string"
}
},
"type": "object"
},
"ReadOnly": {
"description": "Whether the mount should be read-only.",
"type": "boolean"
},
"Source": {
"description": "Mount source (e.g. a volume name, a host path). The source cannot be\nspecified when using `Type=tmpfs`. For `Type=bind`, the source path\nmust either exist, or the `CreateMountpoint` must be set to `true` to\ncreate the source path on the host if missing.\n\nFor `Type=npipe`, the pipe must exist prior to creating the container.",
"type": "string"
},
"Target": {
"description": "Container path.",
"type": "string"
},
"TmpfsOptions": {
"description": "Optional configuration for the `tmpfs` type.",
"properties": {
"Mode": {
"description": "The permission mode for the tmpfs mount in an integer.\nThe value must not be in octal format (e.g. 755) but rather\nthe decimal representation of the octal value (e.g. 493).\n",
"type": "integer"
},
"Options": {
"description": "The options to be passed to the tmpfs mount. An array of arrays.\nFlag options should be provided as 1-length arrays. Other types\nshould be provided as as 2-length arrays, where the first item is\nthe key and the second the value.\n",
"example": [
[
"noexec"
]
],
"items": {
"items": {
"type": "string"
},
"maxItems": 2,
"minItems": 1,
"type": "array"
},
"type": "array"
},
"SizeBytes": {
"description": "The size for the tmpfs mount in bytes.",
"format": "int64",
"type": "integer"
}
},
"type": "object"
},
"Type": {
"allOf": [
{
"$ref": "#/components/schemas/MountType"
}
],
"description": "The mount type. Available types:\n\n- `bind` Mounts a file or directory from the host into the container. The `Source` must exist prior to creating the container.\n- `cluster` a Swarm cluster volume\n- `image` Mounts an image.\n- `npipe` Mounts a named pipe from the host into the container. The `Source` must exist prior to creating the container.\n- `tmpfs` Create a tmpfs with the given options. The mount `Source` cannot be specified for tmpfs.\n- `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.\n"
},
"VolumeOptions": {
"description": "Optional configuration for the `volume` type.",
"properties": {
"DriverConfig": {
"description": "Map of driver specific options",
"properties": {
"Name": {
"description": "Name of the driver to use to create the volume.",
"type": "string"
},
"Options": {
"additionalProperties": {
"type": "string"
},
"description": "key/value map of driver specific options.",
"type": "object"
}
},
"type": "object"
},
"Labels": {
"additionalProperties": {
"type": "string"
},
"description": "User-defined key/value metadata.",
"type": "object"
},
"NoCopy": {
"default": false,
"description": "Populate volume with data from the target.",
"type": "boolean"
},
"Subpath": {
"description": "Source path inside the volume. Must be relative without any back traversals.",
"example": "dir-inside-volume/subdirectory",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}