{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/252","labels_url":"https://api.github.com/repos/docker/swarm/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/252/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/252/events","html_url":"https://github.com/docker/swarm/pull/252","id":54639065,"number":252,"title":"Proposal: add `swarm config`","user":{"login":"vieux","id":1032519,"avatar_url":"https://avatars.githubusercontent.com/u/1032519?v=3","gravatar_id":"","url":"https://api.github.com/users/vieux","html_url":"https://github.com/vieux","followers_url":"https://api.github.com/users/vieux/followers","following_url":"https://api.github.com/users/vieux/following{/other_user}","gists_url":"https://api.github.com/users/vieux/gists{/gist_id}","starred_url":"https://api.github.com/users/vieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vieux/subscriptions","organizations_url":"https://api.github.com/users/vieux/orgs","repos_url":"https://api.github.com/users/vieux/repos","events_url":"https://api.github.com/users/vieux/events{/privacy}","received_events_url":"https://api.github.com/users/vieux/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarm/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"aluzzardi","id":179503,"avatar_url":"https://avatars.githubusercontent.com/u/179503?v=3","gravatar_id":"","url":"https://api.github.com/users/aluzzardi","html_url":"https://github.com/aluzzardi","followers_url":"https://api.github.com/users/aluzzardi/followers","following_url":"https://api.github.com/users/aluzzardi/following{/other_user}","gists_url":"https://api.github.com/users/aluzzardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aluzzardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aluzzardi/subscriptions","organizations_url":"https://api.github.com/users/aluzzardi/orgs","repos_url":"https://api.github.com/users/aluzzardi/repos","events_url":"https://api.github.com/users/aluzzardi/events{/privacy}","received_events_url":"https://api.github.com/users/aluzzardi/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-16T23:38:22Z","updated_at":"2015-01-17T14:15:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/252","html_url":"https://github.com/docker/swarm/pull/252","diff_url":"https://github.com/docker/swarm/pull/252.diff","patch_url":"https://github.com/docker/swarm/pull/252.patch"},"body":"I believe that when we will support `docker pull`, we are going to pull on every machines.\r\nWhen looking at the current docker cli, I don't see any way for us to specify a node.\r\n\r\nThis PR adds a `swarm config` commands that returns you the `<ip:port>` of a node using it's name/ID.\r\n\r\nIt can be used like this:\r\n\r\ndocker -H `swarm  config --discovery token://XXXX ubuntu-2` pull redis\r\ndocker -H `swarm  config --discovery token://XXXX ubuntu-1` rmi nginx\r\n\r\nI called the command `config` to be consistant with docker machine and\r\nalso because I don't know how to call `<ip:port>` (we can't call  the command `swarm ip`)\r\n\r\nTODO: if no `--discovery` flag is provided, you the cache we have on the fs"},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/70368498","html_url":"https://github.com/docker/swarm/pull/252#issuecomment-70368498","issue_url":"https://api.github.com/repos/docker/swarm/issues/252","id":70368498,"user":{"login":"ehazlett","id":260642,"avatar_url":"https://avatars.githubusercontent.com/u/260642?v=3","gravatar_id":"","url":"https://api.github.com/users/ehazlett","html_url":"https://github.com/ehazlett","followers_url":"https://api.github.com/users/ehazlett/followers","following_url":"https://api.github.com/users/ehazlett/following{/other_user}","gists_url":"https://api.github.com/users/ehazlett/gists{/gist_id}","starred_url":"https://api.github.com/users/ehazlett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehazlett/subscriptions","organizations_url":"https://api.github.com/users/ehazlett/orgs","repos_url":"https://api.github.com/users/ehazlett/repos","events_url":"https://api.github.com/users/ehazlett/events{/privacy}","received_events_url":"https://api.github.com/users/ehazlett/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T14:15:41Z","updated_at":"2015-01-17T14:15:41Z","body":"@vieux i like it (i'm not tied to the name `config` either if we wanted to use something different).  i think we should stay consistent though -- for example, in machine, we have `config` output all args not just the IP --  `docker $(machine config test-machine) ps` actually emits something like `docker --tls --tlscacert=/Users/user/.docker/machines/test-machine/ca.pem --tlscert=/Users/users/.docker/machines/test-machine/client.pem --tlskey=/Users/user/.docker/machines/test-machine/client-key.pem -H tcp://192.168.99.110:2376 ps`.  This is because currently we force TLS.  There is also https://github.com/docker/docker/pull/10151 that would allow a config file to be used -- swarm could use this as well."}}