Hey @blake,
Yeah I’ve read that one. And that’s partially what confused me. Because in the destination
stanza documentation the default value is shown as a relative path (i.e. local/
). I probably should’ve payed closer attention to the “…relative to the root of task’s directory” you mentioned, but it wasn’t obvious to me that it applies to absolute path as well.
Another source of confusion for me was the narrowness of my understanding of what task
is in Nomad. Because so far I’ve only used Nomad for container orchestration when I think "Nomad’s task
" I think Docker's container
which is wrong.
The last sentence in your comment describes exactly what I was expecting. But alas it’s not the case. Tested this today and with absolute path, and it seems that by default Nomad creates only the following mounts in the docker container:
"Mounts": [
{
"Type": "bind",
"Source": "/tmp/NomadClient515032879/e954725b-e4ae-5c88-72ac-5fd45f44e654/alloc",
"Destination": "/alloc",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/tmp/NomadClient515032879/e954725b-e4ae-5c88-72ac-5fd45f44e654/redis/local",
"Destination": "/local",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/tmp/NomadClient515032879/e954725b-e4ae-5c88-72ac-5fd45f44e654/redis/secrets",
"Destination": "/secrets",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "1693c07d2a47d4dd5075e71eeed6382fb49a631b95062c23d16078879e49e183",
"Source": "/var/lib/docker/volumes/1693c07d2a47d4dd5075e71eeed6382fb49a631b95062c23d16078879e49e183/_data",
"Destination": "/data",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
]
Well, the more you know.
I guess it’s easier to just use default instead of setting your own path in artifact
's stanza destination
when you’re using containers.