moby--moby/runconfig
Doug Davis 64aac182d6 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>
(cherry picked from commit cdb8ea90b0)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-12-09 14:24:00 -08:00
..
fixtures Move the runconfig.Parse() function into the runconfig/opts package. 2016-01-04 12:06:29 -05:00
opts Fix processing of unset build-args during build 2016-12-09 14:24:00 -08:00
compare.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
compare_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
config.go api: add TypeTmpfs to api/types/mount 2016-10-28 08:38:32 +00:00
config_test.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
config_unix.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
config_windows.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
errors.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
hostconfig.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
hostconfig_solaris.go Add functional support for Docker sub commands on Solaris 2016-11-07 09:06:34 -08:00
hostconfig_test.go Implementing support for --cpu-rt-period and --cpu-rt-runtime so that 2016-10-26 11:33:06 -04:00
hostconfig_unix.go Implementing support for --cpu-rt-period and --cpu-rt-runtime so that 2016-10-26 11:33:06 -04:00
hostconfig_windows.go Implementing support for --cpu-rt-period and --cpu-rt-runtime so that 2016-10-26 11:33:06 -04:00