-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Currently there seems to be no way to run privileged operations outside of docker run -privileged.
That means that I cannot do the same things in a Dockerfile. My recent issue: I'd like to run fuse (for encfs) inside of a container. Installing fuse is already a mess with hacks and ugly workarounds (see [1] and [2]), because mknod fails/isn't supported without a privileged build step.
The only workaround right now is to do the installation manually, using run -privileged, and creating a new 'fuse base image'. Which means that I cannot describe the whole container, from an official base image to finish, in a single Dockerfile.
I'd therefor suggest adding either
- a docker build -privileged
this should do the same thing as run -privileged, i.e. removing all caps limitations
or
- a RUNP command in the Dockerfile
this should .. well .. RUN, but with _P_rivileges
I tried looking at the source, but I'm useless with go and couldn't find a decent entrypoint to attach a proof of concept, unfortunately. :(
1: https://github.com/rogaha/docker-desktop/blob/master/Dockerfile#L40
2: #514 (comment)