ga4gh / task-execution-schemas

Apache License 2.0
80 stars 28 forks source link

All container paths must be absolute? #67

Closed buchanae closed 6 years ago

buchanae commented 7 years ago

Since it's not obvious what the working directory inside the container is, I think all container paths in the spec are required to be absolute paths.

It may be possible to determine the working directory be inspecting the container image, but do people think it's worth adding that complexity? https://github.com/opencontainers/image-spec/blob/master/config.md#properties

buchanae commented 7 years ago

Looks like docker run requires volume mounts to be absolute, so that's a pretty good hint that it's ok to require absolute paths

$ docker run -v /tmp/md5-input.txt:input.txt -it alpine
docker: Error response from daemon: invalid bind mount spec "/tmp/md5-input.txt:input.txt": invalid volume specification: '/tmp/md5-input.txt:input.txt': invalid mount config for type "bind": invalid mount path: 'input.txt' mount path must be absolute.

So unless someone objects, I'll add some docs to the spec saying that container paths must be absolute.

geoffjentry commented 7 years ago

I think it'd be good to do this

buchanae commented 6 years ago

Done