{"action":"created","issue":{"url":"https://api.github.com/repos/docker/machine/issues/1783","labels_url":"https://api.github.com/repos/docker/machine/issues/1783/labels{/name}","comments_url":"https://api.github.com/repos/docker/machine/issues/1783/comments","events_url":"https://api.github.com/repos/docker/machine/issues/1783/events","html_url":"https://github.com/docker/machine/issues/1783","id":104115698,"number":1783,"title":"Discussion: Have some docker-machine commands default to \"default\" VM?","user":{"login":"nathanleclaire","id":1476820,"avatar_url":"https://avatars.githubusercontent.com/u/1476820?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanleclaire","html_url":"https://github.com/nathanleclaire","followers_url":"https://api.github.com/users/nathanleclaire/followers","following_url":"https://api.github.com/users/nathanleclaire/following{/other_user}","gists_url":"https://api.github.com/users/nathanleclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanleclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanleclaire/subscriptions","organizations_url":"https://api.github.com/users/nathanleclaire/orgs","repos_url":"https://api.github.com/users/nathanleclaire/repos","events_url":"https://api.github.com/users/nathanleclaire/events{/privacy}","received_events_url":"https://api.github.com/users/nathanleclaire/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/machine/labels/kind/enhancement","name":"kind/enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-31T19:12:51Z","updated_at":"2015-10-21T23:17:59Z","closed_at":null,"body":"In the original versions of Machine, commands like `docker-machine start` (without any arguments) would automatically run against the \"active\" machine.  This was fine when Machine was directly embedded inside of Docker (a historical curiosity) but ultimately ended up being confusing and problematic so we removed it in favor of always specifying a target machine.\r\n\r\nWith the introduction of the Toolbox and deprecation of boot2docker one of the pieces of feedback we are getting is that users miss simplicity of commands running automatically against a\"default\" machine.  Since it is likely that the majority of users will have only one machine, and we now have what is essentially a canonical default VM in `default`, I am wondering if we might want to just default most commands to be referencing `default`.  The ambiguity would potentially be a lot less than the active tracking method, since there's no, \"Wait, which host is active again?\" conundrum.\r\n\r\ne.g.:\r\n\r\n```console\r\n$ docker-machine create -d virtualbox default\r\n...\r\n$ docker-machine stop\r\n$ docker-machine start\r\n$ docker-machine rm\r\n```\r\n\r\nOne tricky angle on this is `ssh`.  Without arguments it works fine, but it's impractical for CLI to know if something like `docker-machine ssh ls` means \"run `ls` command on `default` machine\" or \"SSH into machine named `ls`\".  So, that would need some thought.\r\n\r\nI don't really want to get into too much implicit behavior e.g. read the default host from a config file etc. because that's what we had before and it was damn confusing to debug when something went wonky.  This might give us 80% of the way there without introducing too much difficult to follow behavior.\r\n\r\nWDYT @ehazlett @tianon @hairyhenderson @bfirsh "},"comment":{"url":"https://api.github.com/repos/docker/machine/issues/comments/150051127","html_url":"https://github.com/docker/machine/issues/1783#issuecomment-150051127","issue_url":"https://api.github.com/repos/docker/machine/issues/1783","id":150051127,"user":{"login":"hairyhenderson","id":2037086,"avatar_url":"https://avatars.githubusercontent.com/u/2037086?v=3","gravatar_id":"","url":"https://api.github.com/users/hairyhenderson","html_url":"https://github.com/hairyhenderson","followers_url":"https://api.github.com/users/hairyhenderson/followers","following_url":"https://api.github.com/users/hairyhenderson/following{/other_user}","gists_url":"https://api.github.com/users/hairyhenderson/gists{/gist_id}","starred_url":"https://api.github.com/users/hairyhenderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairyhenderson/subscriptions","organizations_url":"https://api.github.com/users/hairyhenderson/orgs","repos_url":"https://api.github.com/users/hairyhenderson/repos","events_url":"https://api.github.com/users/hairyhenderson/events{/privacy}","received_events_url":"https://api.github.com/users/hairyhenderson/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T23:17:59Z","updated_at":"2015-10-21T23:17:59Z","body":"> How would everyone feel about having `docker-machine create` default to mean something like `docker-machine create -d virtualbox --virtualbox-memory 2048 default`?\r\n\r\nI'm actually -1 on this. It would break the principle of least surprise. _Almost_ every `docker`, `docker-machine`, and `docker-compose` command requires some form of flag or name to specify what you're intending to do. If I type `docker run`, for example, I don't get the `hello-world` image started up. Instead, I get a helpful usage message. Right now, `docker-machine create` gives a helpful usage message, and it would be surprising if it didn't...\r\n\r\nCan I suggest 2 things instead:\r\n- alter the `virtualbox` driver's `virtualbox-memory` flag to default to 2048 (1024 is just too small these days)\r\n- make `virtualbox` the default driver\r\n\r\nWith this, the new user's experience looks like:\r\n\r\n```console\r\n$ docker-machine create\r\n...A useful help message telling the user they need to specify a name, suggest `default` as a good default...\r\n$ docker-machine create default\r\n...A useful log message telling the user that they've chosen to use the default driver, which is `virtualbox`...\r\n```\r\n\r\nThis is still _super_ simple for new users to get started with, and as a bonus it teaches them the concept of their newly-created machine having a name.\r\n\r\nWhen I help new users get started with Docker Machine, usually they start with the Docker Toolbox, and end up with a machine named `default`, but they have _no_ idea this is the case because it all happened under the covers. When they inevitably need to start running various `docker-machine` commands in their console (often in Windows, which is already a less-than-ideal experience), they're super-confused about what the `default` bit in the command even means."}}