{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/1532","labels_url":"https://api.github.com/repos/docker/compose/issues/1532/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/1532/comments","events_url":"https://api.github.com/repos/docker/compose/issues/1532/events","html_url":"https://github.com/docker/compose/issues/1532","id":86691816,"number":1532,"title":"Support --user option in \"docker-compose run\"","user":{"login":"mrzechonek","id":1334449,"avatar_url":"https://avatars.githubusercontent.com/u/1334449?v=3","gravatar_id":"","url":"https://api.github.com/users/mrzechonek","html_url":"https://github.com/mrzechonek","followers_url":"https://api.github.com/users/mrzechonek/followers","following_url":"https://api.github.com/users/mrzechonek/following{/other_user}","gists_url":"https://api.github.com/users/mrzechonek/gists{/gist_id}","starred_url":"https://api.github.com/users/mrzechonek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrzechonek/subscriptions","organizations_url":"https://api.github.com/users/mrzechonek/orgs","repos_url":"https://api.github.com/users/mrzechonek/repos","events_url":"https://api.github.com/users/mrzechonek/events{/privacy}","received_events_url":"https://api.github.com/users/mrzechonek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-09T18:35:17Z","updated_at":"2015-06-10T02:28:48Z","closed_at":null,"body":"I need to pass `--user` option to run orchestrated containers under my own UID. This is mostly because of mounted host volumes, and I'd like the dockerized app to generate files owned by me, not the root.\r\n\r\nWith `docker-compose up`, this is not possible, at least not directly. Right now I'm using a crazy workaround:\r\n\r\n```bash\r\nNAME=`compose run -d --user=\"$UID\" someservicename`\r\ndocker rename $NAME ${NAME/_run/}\r\n```\r\n\r\nwhich is suboptiomal, to be gentle."},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/110563084","html_url":"https://github.com/docker/compose/issues/1532#issuecomment-110563084","issue_url":"https://api.github.com/repos/docker/compose/issues/1532","id":110563084,"user":{"login":"dnephin","id":442180,"avatar_url":"https://avatars.githubusercontent.com/u/442180?v=3","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T02:28:48Z","updated_at":"2015-06-10T02:28:48Z","body":"I'm not sure I understand, `docker-compose run --user` is an option, and the `docker-compose.yml` supports the `user` key (http://docs.docker.com/compose/yml/#working95dir-entrypoint-user-hostname-domainname-mem95limit-privileged-restart-stdin95open-tty-cpu95shares).\r\n\r\nI guess we'd need to support environment variable resolution in the `user` field so that you can set it to `$UID` is that right? #1377"}}