{"action":"created","comment":{"url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments/71910489","id":71910489,"diff_hunk":"@@ -204,3 +204,134 @@ exports.getOSVersion = (path) ->\n \t.catch (err) ->\n \t\tconsole.log('Could not get OS Version: ', err, err.stack)\n \t\treturn undefined\n+\n+exports.defaultVolumes = {\n+\t'/data': {}\n+\t'/lib/modules': {}\n+\t'/lib/firmware': {}\n+\t'/host/var/lib/connman': {}\n+\t'/host/run/dbus': {}\n+}\n+\n+exports.defaultBinds = (dataPath) ->\n+\treturn [\n+\t\tconfig.dataPath + '/' + dataPath + ':/data'\n+\t\t'/lib/modules:/lib/modules'\n+\t\t'/lib/firmware:/lib/firmware'\n+\t\t'/run/dbus:/host_run/dbus'\n+\t\t'/run/dbus:/host/run/dbus'\n+\t\t'/etc/resolv.conf:/etc/resolv.conf:rw'\n+\t\t'/var/lib/connman:/host/var/lib/connman'\n+\t]\n+\n+exports.validComposeOptions = [\n+\t'command'\n+\t'entrypoint'\n+\t'env_file'\n+\t'environment'\n+\t'expose'\n+\t'image'\n+\t'labels'\n+\t'ports'\n+\t'stop_signal'\n+\t'volumes'\n+\t'user'\n+\t'working_dir'\n+\t'cap_add'\n+\t'cap_drop'\n+\t'devices'\n+\t'dns'\n+\t'dns_search'\n+\t'tmpfs'\n+\t'extra_hosts'\n+\t'links'\n+\t'net'\n+\t'network_mode'\n+\t'ulimits'\n+\t'volumes_from'\n+\t'cpu_shares'\n+\t'cpu_quota'\n+\t'cpuset'\n+\t'domainname'\n+\t'hostname'\n+\t'mac_address'\n+\t'mem_limit'\n+\t'memswap_limit'\n+\t'privileged'\n+\t'tty'\n+\t'read_only'\n+\t'shm_size'\n+\t'ipc'\n+\t'restart'\n+\t'security_opt'\n+\t'networks'\n+\t'pid'\n+]\n+\n+exports.validContainerOptions = [\n+\t'Hostname'\n+\t'Domainname'\n+\t'User'\n+\t'Tty'\n+\t'Env'\n+\t'Labels'\n+\t'Cmd'\n+\t'Entrypoint'\n+\t'Image'\n+\t'Volumes'\n+\t'WorkingDir'\n+\t'NetworkDisabled'\n+\t'ExposedPorts'\n+\t'HostConfig'\n+]","path":"src/utils.coffee","position":null,"original_position":83,"commit_id":"8dceacb5996b81e29992caaf99d4cfbd69a0f49a","original_commit_id":"5ab6f661a2c87cfb45a2578ce926b67d18f3d55c","user":{"login":"pcarranzav","id":2223590,"avatar_url":"https://avatars.githubusercontent.com/u/2223590?v=3","gravatar_id":"","url":"https://api.github.com/users/pcarranzav","html_url":"https://github.com/pcarranzav","followers_url":"https://api.github.com/users/pcarranzav/followers","following_url":"https://api.github.com/users/pcarranzav/following{/other_user}","gists_url":"https://api.github.com/users/pcarranzav/gists{/gist_id}","starred_url":"https://api.github.com/users/pcarranzav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcarranzav/subscriptions","organizations_url":"https://api.github.com/users/pcarranzav/orgs","repos_url":"https://api.github.com/users/pcarranzav/repos","events_url":"https://api.github.com/users/pcarranzav/events{/privacy}","received_events_url":"https://api.github.com/users/pcarranzav/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2016-07-22T16:56:53Z","updated_at":"2016-07-22T16:56:53Z","html_url":"https://github.com/resin-io/resin-supervisor/pull/216#discussion_r71910489","pull_request_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216","_links":{"self":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments/71910489"},"html":{"href":"https://github.com/resin-io/resin-supervisor/pull/216#discussion_r71910489"},"pull_request":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216"}}},"pull_request":{"url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216","id":78210376,"html_url":"https://github.com/resin-io/resin-supervisor/pull/216","diff_url":"https://github.com/resin-io/resin-supervisor/pull/216.diff","patch_url":"https://github.com/resin-io/resin-supervisor/pull/216.patch","issue_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/216","number":216,"state":"open","locked":false,"title":"WIP: Improve containers API","user":{"login":"pcarranzav","id":2223590,"avatar_url":"https://avatars.githubusercontent.com/u/2223590?v=3","gravatar_id":"","url":"https://api.github.com/users/pcarranzav","html_url":"https://github.com/pcarranzav","followers_url":"https://api.github.com/users/pcarranzav/followers","following_url":"https://api.github.com/users/pcarranzav/following{/other_user}","gists_url":"https://api.github.com/users/pcarranzav/gists{/gist_id}","starred_url":"https://api.github.com/users/pcarranzav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcarranzav/subscriptions","organizations_url":"https://api.github.com/users/pcarranzav/orgs","repos_url":"https://api.github.com/users/pcarranzav/repos","events_url":"https://api.github.com/users/pcarranzav/events{/privacy}","received_events_url":"https://api.github.com/users/pcarranzav/received_events","type":"User","site_admin":false},"body":"Add default binds to containers created with API, add /v1/containers/update endpoint, and add a /data bind with an internal id.\r\n\r\nconnects to #215 \r\n\r\nWork in progress. Some things are missing:\r\n- ~~Enforce default volumes in compose endpoint~~\r\n- ~~Limit options in API to the ones we can support~~\r\n- Decide: should we remove the container from the DB and clear its /data on a deleteContainer call?\r\n- Test all of this\r\n\r\n@petrosagg @Page-\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/resin-io/resin-supervisor/216)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-07-20T20:06:37Z","updated_at":"2016-07-22T16:56:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2c69250093638a4731c9d2c2c5ff46d9772b3c1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216/commits","review_comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216/comments","review_comment_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/216/comments","statuses_url":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/8dceacb5996b81e29992caaf99d4cfbd69a0f49a","head":{"label":"resin-io:215-improve-containers-api","ref":"215-improve-containers-api","sha":"8dceacb5996b81e29992caaf99d4cfbd69a0f49a","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":44161944,"name":"resin-supervisor","full_name":"resin-io/resin-supervisor","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/resin-supervisor","description":"Resin Supervisor: resin.io's agent on devices.","fork":false,"url":"https://api.github.com/repos/resin-io/resin-supervisor","forks_url":"https://api.github.com/repos/resin-io/resin-supervisor/forks","keys_url":"https://api.github.com/repos/resin-io/resin-supervisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/resin-supervisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/resin-supervisor/teams","hooks_url":"https://api.github.com/repos/resin-io/resin-supervisor/hooks","issue_events_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/resin-supervisor/events","assignees_url":"https://api.github.com/repos/resin-io/resin-supervisor/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/resin-supervisor/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/tags","blobs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/resin-supervisor/languages","stargazers_url":"https://api.github.com/repos/resin-io/resin-supervisor/stargazers","contributors_url":"https://api.github.com/repos/resin-io/resin-supervisor/contributors","subscribers_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscribers","subscription_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscription","commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/resin-supervisor/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/resin-supervisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/resin-supervisor/merges","archive_url":"https://api.github.com/repos/resin-io/resin-supervisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/resin-supervisor/downloads","issues_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/resin-supervisor/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/resin-supervisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/resin-supervisor/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/resin-supervisor/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/resin-supervisor/deployments","created_at":"2015-10-13T08:15:58Z","updated_at":"2016-07-14T12:41:12Z","pushed_at":"2016-07-22T16:56:23Z","git_url":"git://github.com/resin-io/resin-supervisor.git","ssh_url":"git@github.com:resin-io/resin-supervisor.git","clone_url":"https://github.com/resin-io/resin-supervisor.git","svn_url":"https://github.com/resin-io/resin-supervisor","homepage":"https://resin.io","size":1784,"stargazers_count":28,"watchers_count":28,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":60,"forks":8,"open_issues":60,"watchers":28,"default_branch":"master"}},"base":{"label":"resin-io:master","ref":"master","sha":"23c3ed871931e15a62cd22d19a122408bec125d9","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":44161944,"name":"resin-supervisor","full_name":"resin-io/resin-supervisor","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/resin-supervisor","description":"Resin Supervisor: resin.io's agent on devices.","fork":false,"url":"https://api.github.com/repos/resin-io/resin-supervisor","forks_url":"https://api.github.com/repos/resin-io/resin-supervisor/forks","keys_url":"https://api.github.com/repos/resin-io/resin-supervisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/resin-supervisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/resin-supervisor/teams","hooks_url":"https://api.github.com/repos/resin-io/resin-supervisor/hooks","issue_events_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/resin-supervisor/events","assignees_url":"https://api.github.com/repos/resin-io/resin-supervisor/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/resin-supervisor/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/tags","blobs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/resin-supervisor/languages","stargazers_url":"https://api.github.com/repos/resin-io/resin-supervisor/stargazers","contributors_url":"https://api.github.com/repos/resin-io/resin-supervisor/contributors","subscribers_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscribers","subscription_url":"https://api.github.com/repos/resin-io/resin-supervisor/subscription","commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/resin-supervisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/resin-supervisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/resin-supervisor/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/resin-supervisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/resin-supervisor/merges","archive_url":"https://api.github.com/repos/resin-io/resin-supervisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/resin-supervisor/downloads","issues_url":"https://api.github.com/repos/resin-io/resin-supervisor/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/resin-supervisor/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/resin-supervisor/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/resin-supervisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/resin-supervisor/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/resin-supervisor/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/resin-supervisor/deployments","created_at":"2015-10-13T08:15:58Z","updated_at":"2016-07-14T12:41:12Z","pushed_at":"2016-07-22T16:56:23Z","git_url":"git://github.com/resin-io/resin-supervisor.git","ssh_url":"git@github.com:resin-io/resin-supervisor.git","clone_url":"https://github.com/resin-io/resin-supervisor.git","svn_url":"https://github.com/resin-io/resin-supervisor","homepage":"https://resin.io","size":1784,"stargazers_count":28,"watchers_count":28,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":60,"forks":8,"open_issues":60,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216"},"html":{"href":"https://github.com/resin-io/resin-supervisor/pull/216"},"issue":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/issues/216"},"comments":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/issues/216/comments"},"review_comments":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216/comments"},"review_comment":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/pulls/216/commits"},"statuses":{"href":"https://api.github.com/repos/resin-io/resin-supervisor/statuses/8dceacb5996b81e29992caaf99d4cfbd69a0f49a"}}}}
{"actor":{"display_login":"pcarranzav"}}