machine icon indicating copy to clipboard operation
machine copied to clipboard

Docker-machine doesn't show how to specify a Docker host name

Open pcgeek86 opened this issue 9 years ago • 2 comments

On my Macbook Pro, running Mac OS X El Capitan, I tried using docker-machine to create a new Docker host, and received an error:

Error: No machine name specified

However, there is absolutely nothing in the help text that tells me how to specify the "machine name."

The "usage" says:

Usage: docker-machine create [OPTIONS] [arg...]

Also, the error message is helpful, but it doesn't tell you how to resolve the error. I'm using docker version:

Trevors-MBP:~ trevorsullivan$ docker -v
Docker version 1.10.1, build 9e83765

My recommendation is to avoid making assumptions about the end user's knowledge of command line structure, and make it painfully clear how to properly and comprehensively use the command. Upon further inspection, this actually applies to pretty much all of the docker-machine sub-commands. None of them specify anywhere, how to specify a Docker host's name, within a command call. It is assumed that the user knows to tack it on at the end of the command line.

There should probably also be a common --host parameter on all of the docker-machine sub-commands, so that the user can explicitly specify the Docker host using a named parameter, versus a positional parameter.

Cheers, Trevor Sullivan Microsoft MVP: PowerShell

pcgeek86 avatar Feb 23 '16 15:02 pcgeek86

No, I'm against adding --host.

Despite the guide is very very clear on how to create a machine, I think we should fix the online help, but there is something strictly defined already in codegangsta/cli so it's not just modifying a string.

fsoppelsa avatar Mar 01 '16 14:03 fsoppelsa

I disagree with @fsoppelsa. Refusing to allow for clear instructions is tantamount to insufficiencies in documentation practices. This issue persists, whilst it could have easily been resolved years ago. Please can we request a vote for a good decision rather than a subjective one?

andrejonker avatar Nov 08 '20 13:11 andrejonker