Merge pull request #10546 from SvenDowideit/update-boolean-flags-help

Documentation on boolean flags is wrong #10517
This commit is contained in:
Jessie Frazelle 2015-02-06 15:12:11 -08:00
commit e706be77a4
1 changed files with 13 additions and 8 deletions

View File

@ -32,19 +32,24 @@ To list the help on any command just execute the command, followed by the `--hel
## Option types ## Option types
Single character commandline options can be combined, so rather than Single character command line options can be combined, so rather than
typing `docker run -t -i --name test busybox sh`, typing `docker run -t -i --name test busybox sh`,
you can write `docker run -ti --name test busybox sh`. you can write `docker run -ti --name test busybox sh`.
### Boolean ### Boolean
Boolean options look like `-d=false`. The value you Boolean options take the form `-d=false`. The value you see in the help text is the
see is the default value which gets set if you do **not** use the default value which is set if you do **not** specify that flag. If you specify
boolean flag. If you do call `run -d`, that sets the a Boolean flag without a value, this will set the flag to `true`, irrespective
opposite boolean value, so in this case, `true`, and of the default value.
so `docker run -d` **will** run in "detached" mode,
in the background. Other boolean options are similar specifying them For example, running `docker run -d` will set the value to `true`, so
will set the value to the opposite of the default value. your container **will** run in "detached" mode, in the background.
Options which default to `true` (e.g., `docker build --rm=true`) can only
be set to the non-default value by explicitly setting them to `false`:
$ docker build --rm=false .
### Multi ### Multi