mirror of https://github.com/docker/compose.git
Reorder/clarify args docs
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
ad19ff6c67
commit
8f842d55d7
|
@ -115,9 +115,8 @@ specified.
|
||||||
|
|
||||||
> [Version 2 file format](#version-2) only.
|
> [Version 2 file format](#version-2) only.
|
||||||
|
|
||||||
Add build arguments. You can use either an array or a dictionary. Any
|
Add build arguments, which are environment variables accessible only during the
|
||||||
boolean values; true, false, yes, no, need to be enclosed in quotes to ensure
|
build process.
|
||||||
they are not converted to True or False by the YML parser.
|
|
||||||
|
|
||||||
First, specify the arguments in your Dockerfile:
|
First, specify the arguments in your Dockerfile:
|
||||||
|
|
||||||
|
@ -142,18 +141,15 @@ or a list:
|
||||||
- buildno=1
|
- buildno=1
|
||||||
- password=secret
|
- password=secret
|
||||||
|
|
||||||
Build arguments with only a key are resolved to their environment value on the
|
You can omit the value when specifying a build argument, in which case its value
|
||||||
machine Compose is running on.
|
at build time is the value in the environment where Compose is running.
|
||||||
|
|
||||||
build:
|
args:
|
||||||
args:
|
- buildno
|
||||||
buildno: 1
|
- password
|
||||||
user: someuser
|
|
||||||
|
|
||||||
build:
|
> **Note**: YAML boolean values (`true`, `false`, `yes`, `no`, `on`, `off`) must
|
||||||
args:
|
> be enclosed in quotes, so that the parser interprets them as strings.
|
||||||
- buildno=1
|
|
||||||
- user=someuser
|
|
||||||
|
|
||||||
### cap_add, cap_drop
|
### cap_add, cap_drop
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue