{"action":"created","issue":{"url":"https://api.github.com/repos/projectcalico/calico-docker/issues/399","labels_url":"https://api.github.com/repos/projectcalico/calico-docker/issues/399/labels{/name}","comments_url":"https://api.github.com/repos/projectcalico/calico-docker/issues/399/comments","events_url":"https://api.github.com/repos/projectcalico/calico-docker/issues/399/events","html_url":"https://github.com/projectcalico/calico-docker/issues/399","id":98247893,"number":399,"title":"Calling calicoctl from inside a container","user":{"login":"flipchart","id":1951912,"avatar_url":"https://avatars.githubusercontent.com/u/1951912?v=3","gravatar_id":"","url":"https://api.github.com/users/flipchart","html_url":"https://github.com/flipchart","followers_url":"https://api.github.com/users/flipchart/followers","following_url":"https://api.github.com/users/flipchart/following{/other_user}","gists_url":"https://api.github.com/users/flipchart/gists{/gist_id}","starred_url":"https://api.github.com/users/flipchart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flipchart/subscriptions","organizations_url":"https://api.github.com/users/flipchart/orgs","repos_url":"https://api.github.com/users/flipchart/repos","events_url":"https://api.github.com/users/flipchart/events{/privacy}","received_events_url":"https://api.github.com/users/flipchart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/projectcalico/calico-docker/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/projectcalico/calico-docker/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-07-30T19:48:59Z","updated_at":"2015-08-04T18:13:47Z","closed_at":null,"body":"I would like to be able to modify the host calico network from within a container. Is this currently possible? Specifically I want to be able to add/remove calico profiles from other containers. E.g. if there are 2 containers aaa, bbb, then I want to add a profile xxx to container bbb but run the commands from within container aaa"},"comment":{"url":"https://api.github.com/repos/projectcalico/calico-docker/issues/comments/127697272","html_url":"https://github.com/projectcalico/calico-docker/issues/399#issuecomment-127697272","issue_url":"https://api.github.com/repos/projectcalico/calico-docker/issues/399","id":127697272,"user":{"login":"flipchart","id":1951912,"avatar_url":"https://avatars.githubusercontent.com/u/1951912?v=3","gravatar_id":"","url":"https://api.github.com/users/flipchart","html_url":"https://github.com/flipchart","followers_url":"https://api.github.com/users/flipchart/followers","following_url":"https://api.github.com/users/flipchart/following{/other_user}","gists_url":"https://api.github.com/users/flipchart/gists{/gist_id}","starred_url":"https://api.github.com/users/flipchart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flipchart/subscriptions","organizations_url":"https://api.github.com/users/flipchart/orgs","repos_url":"https://api.github.com/users/flipchart/repos","events_url":"https://api.github.com/users/flipchart/events{/privacy}","received_events_url":"https://api.github.com/users/flipchart/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T18:13:47Z","updated_at":"2015-08-04T18:13:47Z","body":"So to get docker working within the container I had to install it inside the container (not ideal) and then set the variable `DOCKER_HOST`. This gave me access to the host docker environment via docker commands, and also gave me some access to the calico commands all from within the container. The one that didn't work was `calicoctl container xxx endpoint-id show` which gave the output `No endpoint was found for xxx`. This despite `docker ps` showing the container, and `calicoctl endpoint show --detailed` showing the endpoint id. \r\n\r\nFor my particular scenario, I'm going to go about this a different way (using ssh commands against the host from within the container), but I am interested in getting this to work natively. What would be great is to expose a REST api from calico-node which could be called from within the container. But obviously that is a larger piece of work to be done, and perhaps useful only to a handful of people. "}}