[Nomad] How to mount the host path to docker task

Recently I came across a problem where I need to share the host path to Nomad docker task. I have to say that the official document about this part does not explain very clear. I spent quite long time to find the solution. Note that this is not about mounting the host volume to Nomad docker task. Just mount pure folder in host filesystem to Nomad docker task. It is equivalent to the docker command like ...

[Nomad] source path must be a file

When I run up a nomad job with the job file “example.nomad” created by nomad job init, the below error showed up Error getting job struct: Error getting jobfile from "example.nomad": source path must be a file The completed commands are: nomad job init # example.nomad is created nomad job run example.nomad # error pops up This issue stuck me for a while as I clearly remember that I successfully ran it up before. And these are very basic commands to play with Nomad set up. ...

DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !