Updating arg docs in the proper place
Signed-off-by: Jarrod Pooler <jarrod.pooler@homesite.com>
This commit is contained in:
parent
4fb7033d9c
commit
ad19ff6c67
1 changed files with 23 additions and 0 deletions
|
|
@ -119,6 +119,29 @@ Add build arguments. You can use either an array or a dictionary. Any
|
||||||
boolean values; true, false, yes, no, need to be enclosed in quotes to ensure
|
boolean values; true, false, yes, no, need to be enclosed in quotes to ensure
|
||||||
they are not converted to True or False by the YML parser.
|
they are not converted to True or False by the YML parser.
|
||||||
|
|
||||||
|
First, specify the arguments in your Dockerfile:
|
||||||
|
|
||||||
|
ARG buildno
|
||||||
|
ARG password
|
||||||
|
|
||||||
|
RUN echo "Build number: $buildno"
|
||||||
|
RUN script-requiring-password.sh "$password"
|
||||||
|
|
||||||
|
Then specify the arguments under the `build` key. You can pass either a mapping
|
||||||
|
or a list:
|
||||||
|
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
buildno: 1
|
||||||
|
password: secret
|
||||||
|
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
args:
|
||||||
|
- buildno=1
|
||||||
|
- password=secret
|
||||||
|
|
||||||
Build arguments with only a key are resolved to their environment value on the
|
Build arguments with only a key are resolved to their environment value on the
|
||||||
machine Compose is running on.
|
machine Compose is running on.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue