{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/21916","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/21916/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/21916/comments","events_url":"https://api.github.com/repos/docker/docker/issues/21916/events","html_url":"https://github.com/docker/docker/issues/21916","id":147202513,"number":21916,"title":"mount hierarchy bug with tmpfs: tmpfs /tmp is mounted after -v /tmp/.X11","user":{"login":"djtm","id":6469710,"avatar_url":"https://avatars.githubusercontent.com/u/6469710?v=3","gravatar_id":"","url":"https://api.github.com/users/djtm","html_url":"https://github.com/djtm","followers_url":"https://api.github.com/users/djtm/followers","following_url":"https://api.github.com/users/djtm/following{/other_user}","gists_url":"https://api.github.com/users/djtm/gists{/gist_id}","starred_url":"https://api.github.com/users/djtm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djtm/subscriptions","organizations_url":"https://api.github.com/users/djtm/orgs","repos_url":"https://api.github.com/users/djtm/repos","events_url":"https://api.github.com/users/djtm/events{/privacy}","received_events_url":"https://api.github.com/users/djtm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-10T07:21:48Z","updated_at":"2016-04-26T07:41:24Z","closed_at":null,"body":"**Issue:**\r\nIf you run an image with tmpfs and a -v mount, docker first mounts -v, then tmpfs, making the -v mount disappear.\r\n`docker run -it --tmpfs /tmp:rw -v /tmp/.X11-unix:/tmp/.X11-unix alpine ls -a /tmp/`\r\nonly shows `. ..`\r\nwhile\r\n`docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix alpine ls -a /tmp/`\r\nshows `.   ..   .X11-unix`.\r\n\r\nThis makes it harder to use --read-only in production. It does not matter whether tmpfs is before or after the -v mount on the command line.\r\n\r\n**Proposed Fix:**\r\nmount according to directory hierarchy, also for tmpfs.\r\n\r\n**Output of `docker version`:**\r\n```\r\ndocker version\r\nClient:\r\n Version:      1.10.3\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   20f81dd\r\n Built:        Thu Mar 10 15:59:07 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.10.3\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   20f81dd\r\n Built:        Thu Mar 10 15:59:07 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/214656156","html_url":"https://github.com/docker/docker/issues/21916#issuecomment-214656156","issue_url":"https://api.github.com/repos/docker/docker/issues/21916","id":214656156,"user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T07:41:24Z","updated_at":"2016-04-26T07:41:24Z","body":"/cc @rhatdan "}}