github.com/uchennaokeke444/nomad@v0.11.8/e2e/hostvolumes/input/single_mount.nomad (about)

     1  job "test1" {
     2    datacenters = ["dc1", "dc2"]
     3    type        = "service"
     4  
     5    constraint {
     6      attribute = "${attr.kernel.name}"
     7      value     = "linux"
     8    }
     9  
    10    group "test1" {
    11      count = 1
    12  
    13      volume "data" {
    14        type   = "host"
    15        source = "shared_data"
    16      }
    17  
    18      task "test" {
    19        driver = "docker"
    20  
    21        volume_mount {
    22          volume      = "data"
    23          destination = "/tmp/foo"
    24        }
    25  
    26        config {
    27          image = "bash:latest"
    28  
    29          command = "bash"
    30          args    = ["-c", "sleep 15000"]
    31        }
    32      }
    33    }
    34  }