Documentation on boolean flags is wrong #10517

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2015-02-04 13:36:52 +10:00 committed by Tibor Vass
parent 95fe3a1a93
commit 2202790fcd
1 changed files with 13 additions and 8 deletions

View File

@ -38,13 +38,18 @@ you can write `docker run -ti --name test busybox sh`.
### Boolean
Boolean options look like `-d=false`. The value you
see is the default value which gets set if you do **not** use the
boolean flag. If you do call `run -d`, that sets the
opposite boolean value, so in this case, `true`, and
so `docker run -d` **will** run in "detached" mode,
in the background. Other boolean options are similar specifying them
will set the value to the opposite of the default value.
Boolean options take the form `-d=false`. The value you see in the help text is the
default value which is set if you do **not** specify that flag. If you specify
a Boolean flag without a value, this will set the flag to `true`, irrespective
of the default value.
For example, running `docker run -d` will set the value to `true`, so
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