{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/8478","labels_url":"https://api.github.com/repos/docker/docker/issues/8478/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/8478/comments","events_url":"https://api.github.com/repos/docker/docker/issues/8478/events","html_url":"https://github.com/docker/docker/pull/8478","id":45292201,"number":8478,"title":"New implementation of /run support","user":{"login":"rhatdan","id":2000835,"avatar_url":"https://avatars.githubusercontent.com/u/2000835?v=3","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/dco/yes","name":"dco/yes","color":"ededed"},{"url":"https://api.github.com/repos/docker/docker/labels/status/2-needs-code-review","name":"status/2-needs-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/38","html_url":"https://github.com/docker/docker/milestones/1.7.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/38/labels","id":1010239,"number":38,"title":"1.7.0","description":"","creator":{"login":"dmcgowan","id":169601,"avatar_url":"https://avatars.githubusercontent.com/u/169601?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcgowan","html_url":"https://github.com/dmcgowan","followers_url":"https://api.github.com/users/dmcgowan/followers","following_url":"https://api.github.com/users/dmcgowan/following{/other_user}","gists_url":"https://api.github.com/users/dmcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcgowan/subscriptions","organizations_url":"https://api.github.com/users/dmcgowan/orgs","repos_url":"https://api.github.com/users/dmcgowan/repos","events_url":"https://api.github.com/users/dmcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/dmcgowan/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":8,"state":"open","created_at":"2015-03-07T01:54:49Z","updated_at":"2015-04-20T22:30:54Z","due_on":null,"closed_at":null},"comments":47,"created_at":"2014-10-08T20:26:25Z","updated_at":"2015-04-21T00:03:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/8478","html_url":"https://github.com/docker/docker/pull/8478","diff_url":"https://github.com/docker/docker/pull/8478.diff","patch_url":"https://github.com/docker/docker/pull/8478.patch"},"body":"    This mounts a /run tmpfs into the container, with the initial contents\r\n    copies from the /run in the base image, unless NoRunFs is set in the\r\n    HostConfig.\r\n\r\n    Additionally NoRunFs is always set during a docker build, which means\r\n    any setup of /run in a Dockerfile is saved in the image to be copied\r\n    into the final /run tmpfs when a container is started.\r\n\r\n    Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)\r\n\r\nDocker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)\r\n\r\nDocker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/94596856","html_url":"https://github.com/docker/docker/pull/8478#issuecomment-94596856","issue_url":"https://api.github.com/repos/docker/docker/issues/8478","id":94596856,"user":{"login":"rhatdan","id":2000835,"avatar_url":"https://avatars.githubusercontent.com/u/2000835?v=3","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T00:03:54Z","updated_at":"2015-04-21T00:03:54Z","body":"/var/run and /run are basically the same thing.  On modern systems /var/run is a symlink to /run.  I believe Ubuntu was the first to standardize on /run as a tmpfs and Fedora/systemd followed.\r\n\r\nI actually like the idea of specifying in the base image or individual images where the TMPFS directories are.  So I have no problem moving to this model, but you still need to be able to store files/directories in the underlying directory and copying it into the TMPFS.\r\n\r\nFor example apache expects their to be a /run/httpd directory and will not work without it.  Putting this in the base image and allowing libcontainer/docker to preserve it onto the tmpfs is necessary.\r\n\r\n> Where do we draw the line? \r\n\r\nI draw the line at matching what standard distros define.  /run and /tmp as tmpfs.  But if we go with putting it in the base images, I can go along with that.  The goal with /tmp is for --read-only, otherwise not that important.\r\n\r\n> We draw this fine line between what systemd requires and what is \"standard\" in Linux because what major distro isn't influenced by systemd now. \r\n\r\nNot sure the answer to this question.  But trust me I am trying hard to get systemd to change some of its decisions.  Some times I feel like I am between a rock (systemd) and a hard place (docker).  :^)\r\n\r\n> Wasn't the notion of /run really introduced by systemd to begin with? \r\n\r\nNo I think it pre-existed systemd.\r\n\r\n\r\n> If somebody used TMPFS /run then they are deciding to make /run ephemeral and then there is no need to prepopulate /run, right? I'm in favor of making this a Dockerfile command and adding --tmpfs to docker run.   \r\n\r\nI would prefer a syntax like -v tmpfs:/tmp or -v /tmp:T\r\n\r\n> Then we could back out the change in libcontainer.\r\n\r\nNo we need the Premount/Postmount behaviour in libcontainer to be able to get the content off of the image into the tmpfs.\r\n\r\nI could see use cases where I would want to run different containers with different /etc/httpd or /var\r\n\r\ndocker run --read-only -v tmpfs:/var httpd \r\n\r\nWhere httpd would be mounted as a tmpfs but the contents off of the image would be copied into it."}}