{"action":"created","issue":{"url":"https://api.github.com/repos/docker/libcontainer/issues/345","labels_url":"https://api.github.com/repos/docker/libcontainer/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/docker/libcontainer/issues/345/comments","events_url":"https://api.github.com/repos/docker/libcontainer/issues/345/events","html_url":"https://github.com/docker/libcontainer/pull/345","id":55216100,"number":345,"title":"Support read-only root filesystems","user":{"login":"fabiokung","id":5755,"avatar_url":"https://avatars.githubusercontent.com/u/5755?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiokung","html_url":"https://github.com/fabiokung","followers_url":"https://api.github.com/users/fabiokung/followers","following_url":"https://api.github.com/users/fabiokung/following{/other_user}","gists_url":"https://api.github.com/users/fabiokung/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiokung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiokung/subscriptions","organizations_url":"https://api.github.com/users/fabiokung/orgs","repos_url":"https://api.github.com/users/fabiokung/repos","events_url":"https://api.github.com/users/fabiokung/events{/privacy}","received_events_url":"https://api.github.com/users/fabiokung/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-22T22:09:00Z","updated_at":"2015-01-23T20:13:48Z","closed_at":"2015-01-23T00:02:57Z","pull_request":{"url":"https://api.github.com/repos/docker/libcontainer/pulls/345","html_url":"https://github.com/docker/libcontainer/pull/345","diff_url":"https://github.com/docker/libcontainer/pull/345.diff","patch_url":"https://github.com/docker/libcontainer/pull/345.patch"},"body":"This allows users to prepare a read only filesystem with only a few writable subpaths inside it, to be used as the root filesystem by containers.\r\n\r\nIn particular, read only loopback images can now be used as the root filesystem, allowing multiple containers to share the same base (root) image and share pages without necessarily doing CoW layers.\r\n\r\nAll changes are backwards compatible, AFAICT. More details in commit messages.\r\n\r\nSigned-off-by: Fabio Kung <fabio@heroku.com> (github: fabiokung)"},"comment":{"url":"https://api.github.com/repos/docker/libcontainer/issues/comments/71257899","html_url":"https://github.com/docker/libcontainer/pull/345#issuecomment-71257899","issue_url":"https://api.github.com/repos/docker/libcontainer/issues/345","id":71257899,"user":{"login":"fabiokung","id":5755,"avatar_url":"https://avatars.githubusercontent.com/u/5755?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiokung","html_url":"https://github.com/fabiokung","followers_url":"https://api.github.com/users/fabiokung/followers","following_url":"https://api.github.com/users/fabiokung/following{/other_user}","gists_url":"https://api.github.com/users/fabiokung/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiokung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiokung/subscriptions","organizations_url":"https://api.github.com/users/fabiokung/orgs","repos_url":"https://api.github.com/users/fabiokung/repos","events_url":"https://api.github.com/users/fabiokung/events{/privacy}","received_events_url":"https://api.github.com/users/fabiokung/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T20:13:48Z","updated_at":"2015-01-23T20:13:48Z","body":"-1, without having more context on why lxc decided to do it that way.\r\n\r\nI'm 100% sure lxc used to support a custom pivotdir in the past (some of the code and config are still even there).\r\n\r\nAFAICT [the way it is implemented right now](https://github.com/lxc/lxc/blob/ce72f6b466/src/lxc/conf.c#L1049) doesn't respect the constraints imposed by `pivot_root(2)`, so it may be working just by accident, but I can't tell for sure without knowing more about why they did it. `man 2 pivot_root`:\r\n\r\n> put_old **must be** underneath new_root, that is, adding a **nonzero** number of /..  to the string pointed to by put_old must yield the same directory as new_root."}}