Hi there, I’m almost finished setting up my nomad cluster manager / job manager system. I’m a bone head cause I didn’t check if docker can be done offline. Let me explain.
From the documentation it seems like it will get the Docker Images from a cloud -repository.
Is it possible to have the docker images already on all my clients computers and use that image rather then from the cloud??
Glad you got it to work. Yes, Nomad will use the local image first if available.
It’s always a good idea to specify the image tag instead of leaving it empty or using latest, otherwise Nomad will not know which image to use, so it will try asking the remote repository, which defaults to Docker Hub.
when nomad runs this job it tries to load the tar from a relative path and no the direct math I mentioned, as seen in the below alloc message:
Recent Events:
Time Type Description
2021-12-12T16:06:10-05:00 Not Restarting Error was unrecoverable
2021-12-12T16:06:10-05:00 Driver Failure unable to open image archive: open /opt/nomad/alloc/94bae0df-b764-eccb-0000-97a8baf90c42/update_status_task/local/media/tait2.tar: no such file or directory
2021-12-12T16:06:10-05:00 Task Setup Building Task Directory
2021-12-12T16:06:10-05:00 Received Task received by client
Yeah…in general is best to avoid latest because Nomad won’t be able to know if the job needs to be update and will always try to pull the image. From the docs:
If the tag is omitted or equal to latest the driver will always try to pull the image.