{"action":"created","issue":{"url":"https://api.github.com/repos/docker/machine/issues/50","labels_url":"https://api.github.com/repos/docker/machine/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/docker/machine/issues/50/comments","events_url":"https://api.github.com/repos/docker/machine/issues/50/events","html_url":"https://github.com/docker/machine/pull/50","id":51353036,"number":50,"title":"Use a script to bootstrap Docker.","user":{"login":"smashwilson","id":17565,"avatar_url":"https://avatars.githubusercontent.com/u/17565?v=3","gravatar_id":"","url":"https://api.github.com/users/smashwilson","html_url":"https://github.com/smashwilson","followers_url":"https://api.github.com/users/smashwilson/followers","following_url":"https://api.github.com/users/smashwilson/following{/other_user}","gists_url":"https://api.github.com/users/smashwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/smashwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smashwilson/subscriptions","organizations_url":"https://api.github.com/users/smashwilson/orgs","repos_url":"https://api.github.com/users/smashwilson/repos","events_url":"https://api.github.com/users/smashwilson/events{/privacy}","received_events_url":"https://api.github.com/users/smashwilson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-12-08T21:14:14Z","updated_at":"2015-02-06T16:46:03Z","closed_at":"2015-02-06T16:46:03Z","pull_request":{"url":"https://api.github.com/repos/docker/machine/pulls/50","html_url":"https://github.com/docker/machine/pull/50","diff_url":"https://github.com/docker/machine/pull/50.diff","patch_url":"https://github.com/docker/machine/pull/50.patch"},"body":"Rather than rely on each individual driver to bootstrap the hosts that it launches with a properly installed Docker service, it seems like it would be more manageable to centralize the install-and-configure logic in a single place.\r\n\r\nI've started a bash script that uses https://get.docker.io and similar capability-probing logic to configure a host to act as a proper citizen with `machine`. I've been using it from a gist in the Rackspace driver as:\r\n\r\n```go\r\nif err := drivers.AddPublicKeyToAuthorizedHosts(d, \"/.docker/authorized-keys.d\"); err != nil {\r\n\treturn err\r\n}\r\n\r\nsshCmd, err := d.GetSSHCommand(`curl -sSL https://gist.githubusercontent.com/smashwilson/1a286139720a28ac6ead/raw/41d93c57ea2e86815cdfbfec42aaa696034afcc8/setup-docker.sh | /bin/bash`)\r\nif err != nil {\r\n\treturn err\r\n}\r\nif err := sshCmd.Run(); err != nil {\r\n\tlog.Infof(\"Error while bootstrapping docker: %v\", err)\r\n\tlog.Infof(`You'll need to log in with \"machine ssh\" and:`)\r\n\tlog.Infof(\" * Install Docker if necessary\")\r\n\tlog.Infof(\" * Configure Docker to use identity auth and listen on all interfaces\")\r\n}\r\n```\r\n\r\nDo you think this is a useful approach?"},"comment":{"url":"https://api.github.com/repos/docker/machine/issues/comments/73267877","html_url":"https://github.com/docker/machine/pull/50#issuecomment-73267877","issue_url":"https://api.github.com/repos/docker/machine/issues/50","id":73267877,"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-02-06T16:46:03Z","updated_at":"2015-02-06T16:46:03Z","body":"Closing this.  We are most likely going to move to something like cloudinit to allow for more flexibility.  Feel free to give feedback there.  Thanks!"}}