nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

docker-pull.nomad (642B)


      1 # Create a variable registry/images in Nomad with the list of images:
      2 #  image1:latest,image2:v2,more-images:latest
      3 
      4 job "docker-pull" {
      5   datacenters = ["dc1"]
      6   type = "sysbatch"
      7 
      8   periodic {
      9     cron = "@daily"
     10   }
     11 
     12   group "pull" {
     13     count = 1
     14 
     15     task "docker" {
     16       driver = "raw_exec"
     17 
     18       template {
     19         destination = "${NOMAD_TASK_DIR}/pull.sh"
     20         data = file("./templates/pull.sh.tmpl")
     21         perms = 755
     22       }
     23 
     24       config {
     25         command = "/usr/bin/sh"
     26         args = ["-c", "local/pull.sh"]
     27       }
     28 
     29       resources {
     30         memory = 64
     31         memory_max = 256
     32         cpu    = 300
     33       }
     34     }
     35   }
     36 }