# Mount


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





Schema constraints and annotations:

```json
{
  "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"
}
```



