1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/builder/dockerfile
Doug Davis cdb8ea90b0 Fix processing of unset build-args during build
This reverts 26103.  26103 was trying to make it so that if someone did:
  docker build --build-arg FOO .
and FOO wasn't set as an env var then it would pick-up FOO from the
Dockerfile's ARG cmd.  However, it went too far and removed the ability
to specify a build arg w/o any value. Meaning it required the --build-arg
param to always be in the form "name=value", and not just "name".

This PR does the right fix - it allows just "name" and it'll grab the value
from the env vars if set. If "name" isn't set in the env then it still needs
to send "name" to the server so that a warning can be printed about an
unused --build-arg. And this is why buildArgs in the options is now a
*string instead of just a string - 'nil' == mentioned but no value.

Closes #29084

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-12-07 07:41:55 -08:00
..
command Builder default shell 2016-06-03 13:54:31 -07:00
parser Revert "Fix dockerfile parser with empty line after escape" 2016-12-02 14:15:55 +01:00
bflag.go correct some nits in comment and test files 2016-08-29 18:37:14 +08:00
bflag_test.go Move builder files to builder/dockerfile 2015-10-05 18:26:47 -04:00
builder.go Fix processing of unset build-args during build 2016-12-07 07:41:55 -08:00
builder_unix.go Builder default shell 2016-06-03 13:54:31 -07:00
builder_windows.go Builder default shell 2016-06-03 13:54:31 -07:00
dispatchers.go Fix processing of unset build-args during build 2016-12-07 07:41:55 -08:00
dispatchers_test.go Fix processing of unset build-args during build 2016-12-07 07:41:55 -08:00
dispatchers_unix.go Builder default shell 2016-06-03 13:54:31 -07:00
dispatchers_unix_test.go Builder dispatchers unit tests 2016-07-12 07:40:25 +02:00
dispatchers_windows.go Use filepath.Clean in normaliseWorkdir for windows 2016-10-31 13:27:05 -07:00
dispatchers_windows_test.go Use filepath.Clean in normaliseWorkdir for windows 2016-10-31 13:27:05 -07:00
envVarTest Windows: Builder case insensitive env 2016-11-28 10:30:45 -08:00
evaluator.go Fix processing of unset build-args during build 2016-12-07 07:41:55 -08:00
evaluator_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
evaluator_unix.go Enabling expose support for Windows TP5 2016-03-30 17:25:41 -07:00
evaluator_windows.go Windows: Allow user in builder 2016-11-14 14:10:47 -08:00
internals.go Remove hostname validation as it seems to break users 2016-11-30 19:22:07 +01:00
internals_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
internals_unix.go Windows: Fix wildcard expansion after slash in filename 2016-09-14 11:40:57 -07:00
internals_windows.go Windows: Fix wildcard expansion after slash in filename 2016-09-14 11:40:57 -07:00
internals_windows_test.go Windows: Reduce CLI time, move some to unit tests 2016-05-06 12:26:08 -07:00
shell_parser.go Windows: Builder case insensitive env 2016-11-28 10:30:45 -08:00
shell_parser_test.go Windows: Builder case insensitive env 2016-11-28 10:30:45 -08:00
support.go Builder default shell 2016-06-03 13:54:31 -07:00
support_test.go Unit tests for builder/dockerfile/support 2016-04-16 00:19:58 +02:00
utils_test.go Reimplement integration test for symlink Dockerfile as a unit test 2016-06-14 23:07:19 +02:00
wordsTest Allow for env vars to have spaces in some cases 2015-11-09 12:42:56 -08:00