Skip to content

Commit

Permalink
fix: force pulling of Docker images
Browse files Browse the repository at this point in the history
Nomad correctly wasn't pulling the latests changes for tags different than `latest`.
https://developer.hashicorp.com/nomad/docs/drivers/docker#force_pull
  • Loading branch information
IgnacioHeredia committed Feb 7, 2024
1 parent 7a63026 commit c811bba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 7 additions & 6 deletions etc/modules/nomad.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}
Expand Down
7 changes: 4 additions & 3 deletions etc/tools/deep-oc-federated-server/nomad.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c811bba

Please sign in to comment.