grammarly / rocker

Rocker breaks the limits of Dockerfile.
Other
1.34k stars 88 forks source link

MOUNT: permission on host filesystem #169

Closed bendikro closed 6 years ago

bendikro commented 7 years ago

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?

rodio commented 7 years ago

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.

stuaxo commented 6 years ago

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
ybogdanov commented 6 years ago

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.