common/base_images.nomad.hcl

23 lines
535 B
HCL

job "base_images" {
[[ template "common/job_start.tpl" . ]]
# Note : This is not a job to run
# Just a dummy job file for ctctl to be able to easily build base images
# So just set a constrain to be sure the job can't run
constraint {
attribute = "${attr.kernel.name}"
value = "nonexistant"
}
group "base_images" {
[[- range $k, $v := .docker.base_images ]]
task [[ $k | toJSON ]] {
driver = "docker"
config {
image = "[[ $.docker.repo ]][[ $v.image ]]"
}
}
[[- end ]]
}
}