Update compose-file-v2.md

Updated Documentation section ARGS added a note about the fact that ARG defined befor FROM is not there after FROM without explicit adding it again after FROM
This commit is contained in:
Frank Lemanschik 2019-02-14 08:33:45 +01:00 committed by GitHub
parent ba09fac0b9
commit f314f2cd51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,10 @@ or a list:
args: args:
- buildno=1 - buildno=1
- gitcommithash=cdc3b19 - gitcommithash=cdc3b19
> **Note**: if you specify `ARG` in your Dockerfile befor the `FROM` instruction
> then the `ARG` will not be available in the buld instructions under `FROM`
> if you need a argument in both places simply place it again under the `FROM` instruction
You can omit the value when specifying a build argument, in which case its value You can omit the value when specifying a build argument, in which case its value
at build time is the value in the environment where Compose is running. at build time is the value in the environment where Compose is running.