From c811bba6e6412d547d2ee1f029348958dddaa2c7 Mon Sep 17 00:00:00 2001 From: Ignacio Heredia Date: Wed, 7 Feb 2024 14:09:50 +0100 Subject: [PATCH] fix: force pulling of Docker images Nomad correctly wasn't pulling the latests changes for tags different than `latest`. https://developer.hashicorp.com/nomad/docs/drivers/docker#force_pull --- etc/modules/nomad.hcl | 13 +++++++------ etc/tools/deep-oc-federated-server/nomad.hcl | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/etc/modules/nomad.hcl b/etc/modules/nomad.hcl index 0772f13..578c25e 100644 --- a/etc/modules/nomad.hcl +++ b/etc/modules/nomad.hcl @@ -132,12 +132,13 @@ job "userjob-${JOB_UUID}" { driver = "docker" config { - image = "${DOCKER_IMAGE}:${DOCKER_TAG}" - command = "deep-start" - args = ["--${SERVICE}"] - ports = ["api", "monitor", "ide"] - shm_size = ${SHARED_MEMORY} - volumes = [ + force_pull = true + image = "${DOCKER_IMAGE}:${DOCKER_TAG}" + command = "deep-start" + args = ["--${SERVICE}"] + ports = ["api", "monitor", "ide"] + shm_size = ${SHARED_MEMORY} + volumes = [ "/nomad-storage/${JOB_UUID}:/storage:shared", ] } diff --git a/etc/tools/deep-oc-federated-server/nomad.hcl b/etc/tools/deep-oc-federated-server/nomad.hcl index f40947d..70d93b0 100644 --- a/etc/tools/deep-oc-federated-server/nomad.hcl +++ b/etc/tools/deep-oc-federated-server/nomad.hcl @@ -102,9 +102,10 @@ job "userjob-${JOB_UUID}" { # Use default command defined in the Dockerfile config { - image = "${DOCKER_IMAGE}:${DOCKER_TAG}" - ports = ["fedserver", "monitor", "ide"] - shm_size = ${SHARED_MEMORY} + force_pull = true + image = "${DOCKER_IMAGE}:${DOCKER_TAG}" + ports = ["fedserver", "monitor", "ide"] + shm_size = ${SHARED_MEMORY} } env {