{"action":"created","issue":{"url":"https://api.github.com/repos/habitat-sh/habitat/issues/4716","repository_url":"https://api.github.com/repos/habitat-sh/habitat","labels_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4716/labels{/name}","comments_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4716/comments","events_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4716/events","html_url":"https://github.com/habitat-sh/habitat/issues/4716","id":303175057,"number":4716,"title":"hab-studio on linux should not require root/sudo when using docker","user":{"login":"jeremiahsnapp","id":430911,"avatar_url":"https://avatars2.githubusercontent.com/u/430911?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremiahsnapp","html_url":"https://github.com/jeremiahsnapp","followers_url":"https://api.github.com/users/jeremiahsnapp/followers","following_url":"https://api.github.com/users/jeremiahsnapp/following{/other_user}","gists_url":"https://api.github.com/users/jeremiahsnapp/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremiahsnapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremiahsnapp/subscriptions","organizations_url":"https://api.github.com/users/jeremiahsnapp/orgs","repos_url":"https://api.github.com/users/jeremiahsnapp/repos","events_url":"https://api.github.com/users/jeremiahsnapp/events{/privacy}","received_events_url":"https://api.github.com/users/jeremiahsnapp/received_events","type":"User","site_admin":false},"labels":[{"id":621113762,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/A-studio","name":"A-studio","color":"87B09A","default":false},{"id":621117263,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/C-bug","name":"C-bug","color":"ff9012","default":false},{"id":621119535,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/E-easy","name":"E-easy","color":"4296b4","default":false},{"id":858212529,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/I-linux","name":"I-linux","color":"c3c6c8","default":false},{"id":621119785,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/L-rust","name":"L-rust","color":"5c6670","default":false},{"id":858212526,"url":"https://api.github.com/repos/habitat-sh/habitat/labels/P-3","name":"P-3","color":"3257bc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T16:48:12Z","updated_at":"2018-03-07T16:55:01Z","closed_at":null,"author_association":"NONE","body":"I want to use docker to enter a studio on a linux system to avoid root/sudo requirements but when I run `hab studio enter -D` I still get prompted by sudo for my password. After some [discussion in the forums](https://forums.habitat.sh/t/how-to-avoid-sudo-when-entering-hab-studio-on-linux/429) it was agreed that this is a bug since my user is a member of the `docker` group and already has appropriate permissions to start a docker container without requiring root/sudo. Can we please get `hab studio enter -D` to work on a linux system for a non-root user?"},"comment":{"url":"https://api.github.com/repos/habitat-sh/habitat/issues/comments/371205272","html_url":"https://github.com/habitat-sh/habitat/issues/4716#issuecomment-371205272","issue_url":"https://api.github.com/repos/habitat-sh/habitat/issues/4716","id":371205272,"user":{"login":"eeyun","id":12615148,"avatar_url":"https://avatars1.githubusercontent.com/u/12615148?v=4","gravatar_id":"","url":"https://api.github.com/users/eeyun","html_url":"https://github.com/eeyun","followers_url":"https://api.github.com/users/eeyun/followers","following_url":"https://api.github.com/users/eeyun/following{/other_user}","gists_url":"https://api.github.com/users/eeyun/gists{/gist_id}","starred_url":"https://api.github.com/users/eeyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeyun/subscriptions","organizations_url":"https://api.github.com/users/eeyun/orgs","repos_url":"https://api.github.com/users/eeyun/repos","events_url":"https://api.github.com/users/eeyun/events{/privacy}","received_events_url":"https://api.github.com/users/eeyun/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T16:55:01Z","updated_at":"2018-03-07T16:55:01Z","author_association":"CONTRIBUTOR","body":"In discussion with jeremiah on this subject I think we could quite easily add a quick catch to the studio enter code path for linux to check whether the `-D` flag was passed and if it was, instead of _only_ checking for root privileges, validate that the user executing the command is a member of the `docker` group. Either of these should guarantee a safe execution of studio in docker.\r\n\r\nDoing this unblocks users that are driving habitat package builds via CI where executing with root privileges might not be the most appropriate/possible way to handle a build."}}
{"actor":{"display_login":"eeyun"}}