job "check-firewall" { datacenters = ["dc1"] type = "batch" group "check" { count = 1 constraint { attribute = "${attr.unique.hostname}" value = "odroid7" } task "check" { driver = "docker" config { image = "busybox" network_mode = "host" command = "sh" args = ["-c", "nc -zv 127.0.0.1 20202 && echo 'Listening'"] } } } }