github.com/hernad/nomad@v1.6.112/e2e/consul/input/services_present.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "consul-register-on-update" {
     5    datacenters = ["dc1"]
     6    type        = "service"
     7  
     8    constraint {
     9      attribute = "${attr.kernel.name}"
    10      value     = "linux"
    11    }
    12  
    13    group "echo" {
    14  
    15      task "busybox-nc" {
    16        driver = "docker"
    17  
    18        config {
    19          image   = "busybox:1"
    20          command = "nc"
    21          args = [
    22            "-ll",
    23            "-p",
    24            "1234",
    25            "-e",
    26          "/bin/cat"]
    27        }
    28  
    29        service {
    30          name = "nc-service"
    31        }
    32      }
    33    }
    34  }