Reorder/clarify args docs
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Aanand Prasad
7 years ago
114 | 114 | |
115 | 115 | > [Version 2 file format](#version-2) only. |
116 | 116 | |
117 | Add build arguments. You can use either an array or a dictionary. Any | |
118 | boolean values; true, false, yes, no, need to be enclosed in quotes to ensure | |
119 | they are not converted to True or False by the YML parser. | |
117 | Add build arguments, which are environment variables accessible only during the | |
118 | build process. | |
120 | 119 | |
121 | 120 | First, specify the arguments in your Dockerfile: |
122 | 121 | |
141 | 140 | - buildno=1 |
142 | 141 | - password=secret |
143 | 142 | |
144 | Build arguments with only a key are resolved to their environment value on the | |
145 | machine Compose is running on. | |
146 | ||
147 | build: | |
148 | args: | |
149 | buildno: 1 | |
150 | user: someuser | |
151 | ||
152 | build: | |
153 | args: | |
154 | - buildno=1 | |
155 | - user=someuser | |
143 | You can omit the value when specifying a build argument, in which case its value | |
144 | at build time is the value in the environment where Compose is running. | |
145 | ||
146 | args: | |
147 | - buildno | |
148 | - password | |
149 | ||
150 | > **Note**: YAML boolean values (`true`, `false`, `yes`, `no`, `on`, `off`) must | |
151 | > be enclosed in quotes, so that the parser interprets them as strings. | |
156 | 152 | |
157 | 153 | ### cap_add, cap_drop |
158 | 154 |