github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/website/pages/docs/job-specification/volume_mount.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: volume_mount Stanza - Job Specification
     4  sidebar_title: volume_mount
     5  description: |-
     6    The "volume_mount" stanza allows the task to specify where a group "volume"
     7    should be mounted.
     8  ---
     9  
    10  # `volume_mount` Stanza
    11  
    12  <Placement groups={['job', 'group', 'task', 'volume_mount']} />
    13  
    14  The `volume_mount` stanza allows the task to specify how a group
    15  [`volume`][volume] should be mounted into the task.
    16  
    17  ```hcl
    18  job "docs" {
    19    group "example" {
    20      volume "certs" {
    21        type = "host"
    22        read_only = true
    23        source = "ca-certificates"
    24      }
    25  
    26      task "example" {
    27        volume_mount {
    28          volume      = "certs"
    29          destination = "/etc/ssl/certs"
    30        }
    31      }
    32    }
    33  }
    34  ```
    35  
    36  The Nomad client will make the volumes available to tasks according to this
    37  configuration, and it will fail the allocation if the client configuration
    38  updates to remove a volume that it depends on.
    39  
    40  ## `volume_mount` Parameters
    41  
    42  - `volume` `(string: "")` - Specifies the group volume that the mount is going
    43    to access.
    44  
    45  - `destination` `(string: "")` - Specifies where the volume should be mounted
    46    inside the task's allocation.
    47  
    48  - `read_only` `(bool: false)` - When a group volume is writeable, you may
    49    specify that it is `read_only` on a per mount level using the `read_only`
    50    option here.
    51  
    52  [volume]: /docs/job-specification/volume 'Nomad volume Job Specification'