{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/22323","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/22323/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/22323/comments","events_url":"https://api.github.com/repos/docker/docker/issues/22323/events","html_url":"https://github.com/docker/docker/issues/22323","id":151018138,"number":22323,"title":"linux spec user: Unable to find user xxx","user":{"login":"edannenberg","id":1352794,"avatar_url":"https://avatars.githubusercontent.com/u/1352794?v=3","gravatar_id":"","url":"https://api.github.com/users/edannenberg","html_url":"https://github.com/edannenberg","followers_url":"https://api.github.com/users/edannenberg/followers","following_url":"https://api.github.com/users/edannenberg/following{/other_user}","gists_url":"https://api.github.com/users/edannenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/edannenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edannenberg/subscriptions","organizations_url":"https://api.github.com/users/edannenberg/orgs","repos_url":"https://api.github.com/users/edannenberg/repos","events_url":"https://api.github.com/users/edannenberg/events{/privacy}","received_events_url":"https://api.github.com/users/edannenberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T01:19:28Z","updated_at":"2016-04-26T12:24:03Z","closed_at":null,"body":"Since upgrading to Docker 1.11.0 the following won't work anymore:\r\n\r\n    $ docker run -it --rm --user $(whoami) -v /etc/passwd:/etc/passwd:ro busybox\r\n    docker: Error response from daemon: linux spec user: Unable to find user xxx\r\n\r\nYou also get some funny behavior when using a non root user that exists in the image's `/etc/passwd`:\r\n\r\n    $ docker run -it --rm --user operator -v /etc/passwd:/etc/passwd:ro busybox whoami\r\n    whoami: unknown uid 37\r\n\r\nDepending on your system the above might actually work fine or output some other random user name, on my host `/etc/passwd` has no entry for uid 37.\r\n\r\nApparently `--user` is now set before the `/etc/passwd` file of the host is mounted in the container. Can this functionality be restored in a future release? If not, mounting the host's `/etc/passwd` should not be allowed as it will just lead to problems down the road.\r\n\r\nThe use case for this is mainly for local development, where, for example, you would like to run a css preprocesser watching your source files and want to avoid any file permission head aches.\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/214722271","html_url":"https://github.com/docker/docker/issues/22323#issuecomment-214722271","issue_url":"https://api.github.com/repos/docker/docker/issues/22323","id":214722271,"user":{"login":"pgracio","id":6394524,"avatar_url":"https://avatars.githubusercontent.com/u/6394524?v=3","gravatar_id":"","url":"https://api.github.com/users/pgracio","html_url":"https://github.com/pgracio","followers_url":"https://api.github.com/users/pgracio/followers","following_url":"https://api.github.com/users/pgracio/following{/other_user}","gists_url":"https://api.github.com/users/pgracio/gists{/gist_id}","starred_url":"https://api.github.com/users/pgracio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgracio/subscriptions","organizations_url":"https://api.github.com/users/pgracio/orgs","repos_url":"https://api.github.com/users/pgracio/repos","events_url":"https://api.github.com/users/pgracio/events{/privacy}","received_events_url":"https://api.github.com/users/pgracio/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T12:24:02Z","updated_at":"2016-04-26T12:24:02Z","body":"+1"}}