Nomadproject.io missing documentation about Docker driver `image` behavior

Hi there!

I just discovered an undocumented (and, for my team, useful) behavior of Nomad’s Docker driver that I’d love to see documented on Drivers: Docker | Nomad | HashiCorp Developer .

According to Hashicorp dev jrasell, in this topic:

Nomad looks locally first for Docker images before attempting to pull from Docker Hub.

This is not mentioned in the online documentation, which says conversely:

By default it will be fetched from Docker Hub

Would love to get this cleared up. Thank you!

Nomad delegates image handling to the Docker daemon, which default behavior is to check the existence of an image locally before pulling from Docker Hub (unless you run docker run --pull always, which corresponds to force_pull = true in Nomad’s job file). So the pulling strategy is not really a feature of Nomad itself.

It looks like Nomad does have its own specific behavior around ‘latest’ that is not specified by Docker:

Basically:
tag ‘latest’ causes a force pull, and that’s not documented (and not default Docker behavior).

Hi @wimax-grapl and @fhemberger, thanks for the discussion on this topic. I feel this is something worth documenting on the Nomad site so readers don’t have to search for this detail in multiple places.

@wimax-grapl would you be able to raise an issue request against the Nomad repository so we can track this?

Thanks,
jrasell and the Nomad team

This behavior is described in the documentation for the image attribute for the Docker task driver.

If the tag is omitted or equal to latest the driver will always try to pull the image.

Is it a question of formatting that information so that it’s more visible?

I guess ultimately my problem is with the previous sentence, “By default it will be fetched from Docker Hub”. The true behavior is that "By default it will be fetched from the host’s Docker daemon, unless the tag is latest".

Anyway - yes, I’ll raise an issue. Thanks!