Codebase list docker-compose / 4253039
Reorder/clarify args docs Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com> Aanand Prasad 7 years ago
1 changed file(s) with 11 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
114114
115115 > [Version 2 file format](#version-2) only.
116116
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.
120119
121120 First, specify the arguments in your Dockerfile:
122121
141140 - buildno=1
142141 - password=secret
143142
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.
156152
157153 ### cap_add, cap_drop
158154