nutritious-minister-3808
07/18/2022, 9:01 PM./pants package
? I.e. if I have explicit values set for a build_arg through the pants.toml
or extra_build_args
field on my docker_image
target, simply setting a environment variable in the pants environment does not overwrite the explicit value - however if there is no explicit value set - setting the environment variable does get passed through to the build. This seems a little odd but I can understand why this isn't seen as an issue because it only really becomes a problem when I try to use a build_arg to dynamically tag my images. I can provide additional details if need be.nutritious-minister-3808
07/18/2022, 9:06 PMimage_tags=["{build_args.IMAGE_TAG}"]
but I want to be able to provide a default tag if that IMAGE_TAG
env var is not set. Currently ./pants package path_to_my_build:image
understandably does not work because IMAGE_TAG
is not defined. If I define a explicit value in the build_args sections of pants.toml
or extra_build_args
section the environment variable is never taken into account.nutritious-minister-3808
07/18/2022, 9:08 PM./pants help-advanced docker
never imply that what I am trying to do is possible and they seem to quite deliberately not call the values set in the build_args section of pants.toml
or extra_build_args
defaults and instead call them "explicit values"curved-television-6568
07/18/2022, 9:55 PMcurved-television-6568
07/18/2022, 9:56 PMnutritious-minister-3808
07/18/2022, 9:57 PM