MOUNT: permission on host filesystem
bendikro opened this issue · 3 comments
When issuing MOUNT dir/on/host:/var/cache/yum
, the directories dir/on/host
are created on the host owned by the root user.
Is there a simple solution to have the dir/on/host
including files files and directories created inside this directory to be deletable by the user running rocker build
?
Hello, @bendikro! Thanks for your question. I'm not sure, but it seems that it is Docker daemon who creates dir/on/host
(not Rocker), and since Docker daemon is run as the root user, files and directories are owned by the root user. So, we need to think whether can do something about this.
Just hit this in the Docker, and it is pretty bad if you run as another user. Looks like something Docker isn't going to fix any time soon.
Braindump:
Tried to think of a solution, but really it makes sense if the volumes are created by the user that ran Rockerfile/Dockerfile anything else is surprising.
Another solution could be new syntax -
Add USERVOLUME
syntax to Rockerfile
# create volume /src owned by current host user
USERVOLUME /src
Thanks for reporting. Unfortunately, we are discontinuing this project. See the notice here: https://github.com/grammarly/rocker/blob/master/README.md
Closing this issue as we are not able to address it. Sorry.