{"action":"opened","issue":{"url":"https://api.github.com/repos/docker/docker/issues/12696","labels_url":"https://api.github.com/repos/docker/docker/issues/12696/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/12696/comments","events_url":"https://api.github.com/repos/docker/docker/issues/12696/events","html_url":"https://github.com/docker/docker/issues/12696","id":70427459,"number":12696,"title":"File mounted as a volume in a container spawned from another container becomes a directory","user":{"login":"rsokolowski","id":10743336,"avatar_url":"https://avatars.githubusercontent.com/u/10743336?v=3","gravatar_id":"","url":"https://api.github.com/users/rsokolowski","html_url":"https://github.com/rsokolowski","followers_url":"https://api.github.com/users/rsokolowski/followers","following_url":"https://api.github.com/users/rsokolowski/following{/other_user}","gists_url":"https://api.github.com/users/rsokolowski/gists{/gist_id}","starred_url":"https://api.github.com/users/rsokolowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsokolowski/subscriptions","organizations_url":"https://api.github.com/users/rsokolowski/orgs","repos_url":"https://api.github.com/users/rsokolowski/repos","events_url":"https://api.github.com/users/rsokolowski/events{/privacy}","received_events_url":"https://api.github.com/users/rsokolowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-23T14:32:40Z","updated_at":"2015-04-23T14:32:40Z","closed_at":null,"body":"I'm creating Docker container from within a Docker container. When I mount a file volume (or a directory that contains files) to a child container then it is viewed as a directory.\r\ndocker version\r\nClient version: 1.5.0\r\nClient API version: 1.17\r\nGo version (client): go1.4.1\r\nGit commit (client): a8a31ef\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.5.0\r\nServer API version: 1.17\r\nGo version (server): go1.4.1\r\nGit commit (server): a8a31ef\r\n\r\n$ echo 'file' > file.txt\r\n$ docker run -i  -v /var/run/docker.sock:/var/run/docker.sock:ro -v /usr/bin/docker:/usr/bin/docker:ro -v ~/file.txt:/file.txt ubuntu:latest\r\n$ ls -lh\r\n...\r\n-rw-r-----   1 108109 5000    5 Apr 23 14:25 file.txt\r\n$ docker run -v /file.txt:/file.txt ubuntu:latest ls -lh\r\n...\r\ndrwxr-xr-x   2 root root 4.0K Apr 23 14:26 file.txt\r\n\r\nAm I doing something wrong or is it a bug ? Thanks !\r\n"}}