{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/1916","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/1916/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/1916/comments","events_url":"https://api.github.com/repos/docker/docker/issues/1916/events","html_url":"https://github.com/docker/docker/issues/1916","id":19674208,"number":1916,"title":"docker build should support privileged operations","user":{"login":"darklajid","id":77554,"avatar_url":"https://avatars.githubusercontent.com/u/77554?v=3","gravatar_id":"","url":"https://api.github.com/users/darklajid","html_url":"https://github.com/darklajid","followers_url":"https://api.github.com/users/darklajid/followers","following_url":"https://api.github.com/users/darklajid/following{/other_user}","gists_url":"https://api.github.com/users/darklajid/gists{/gist_id}","starred_url":"https://api.github.com/users/darklajid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darklajid/subscriptions","organizations_url":"https://api.github.com/users/darklajid/orgs","repos_url":"https://api.github.com/users/darklajid/repos","events_url":"https://api.github.com/users/darklajid/events{/privacy}","received_events_url":"https://api.github.com/users/darklajid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/builder","name":"area/builder","color":"0052cc"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/feature","name":"kind/feature","color":"AAB3AB"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":179,"created_at":"2013-09-18T11:07:11Z","updated_at":"2016-05-03T00:57:25Z","closed_at":null,"body":"Currently there seems to be no way to run privileged operations outside of docker run -privileged. \r\n\r\nThat 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.\r\n\r\nThe 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.\r\n\r\nI'd therefor suggest adding either\r\n- a docker build -privileged  \r\n  this should do the same thing as run -privileged, i.e. removing all caps limitations\r\n\r\nor\r\n\r\n- a RUNP command in the Dockerfile  \r\n  this should .. well .. RUN, but with _P_rivileges\r\n\r\nI 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. :(\r\n\r\n1: https://github.com/rogaha/docker-desktop/blob/master/Dockerfile#L40\r\n2: https://github.com/dotcloud/docker/issues/514#issuecomment-22101217"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/216407842","html_url":"https://github.com/docker/docker/issues/1916#issuecomment-216407842","issue_url":"https://api.github.com/repos/docker/docker/issues/1916","id":216407842,"user":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars.githubusercontent.com/u/799078?v=3","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T00:57:25Z","updated_at":"2016-05-03T00:57:25Z","body":"@ctindel I would love to see some examples of image portability being broken\r\n\r\nDoing this kind of stuff at first container start is _exactly_ the right way to go.\r\nIt's a runtime configuration it shouldn't be in the image."}}