job "chroot_dl_exec" { datacenters = ["dc1"] type = "batch" constraint { attribute = "${attr.kernel.name}" value = "linux" } group "group" { network { mode = "host" port "http" {} } task "script-writer" { driver = "raw_exec" config { command = "/bin/bash" args = [ "-c", "cd ${NOMAD_ALLOC_DIR} && chmod +x script.sh && tar -czf script.tar.gz script.sh" ] } resources { cpu = 10 memory = 12 } template { data = <