Hi Miguel,
The reasoning for making the root FS read-only is to encourage portability (and give implementers more flexibility) by limiting where the tools can write. Denis's suggestion of specifying volumes in your Dockerfile is a fine solution, since that explicitly indicates that you need to write to that directory.
The reason for --user is so that the user id inside the container matches the user invoking the container. This had two benefits: better security (the container user is not root), and it avoids the problem of output files being written as a different user such that the host user doesn't own the output.
Docker 1.10 introduces user namespace mapping, which mitigates some of these issues. I'm also experimenting with using the setgid bit in the output directory as another way of ensuring that the host user can access files created by the container user.
Thanks,
Peter
> --
> You received this message because you are subscribed to the Google Groups
> "common-workflow-language" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to common-workflow-la...@googlegroups.com.
> To post to this group, send email to
> common-workf...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/common-workflow-language/f70896ed-821b-4fbd-9f10-ebaf51c1f5d7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Hi Miguel,
The reasoning for making the root FS read-only is to encourage portability (and give implementers more flexibility) by limiting where the tools can write.
Denis's suggestion of specifying volumes in your Dockerfile is a fine solution, since that explicitly indicates that you need to write to that directory.
The reason for --user is so that the user id inside the container matches the user invoking the container. This had two benefits: better security (the container user is not root), and it avoids the problem of output files being written as a different user such that the host user doesn't own the output.
Docker 1.10 introduces user namespace mapping, which mitigates some of these issues. I'm also experimenting with using the setgid bit in the output directory as another way of ensuring that the host user can access files created by the container user.