Is it possible to override an individual docker bu...
# general
e
Is it possible to override an individual docker build arg at package time?
PANTS_DOCKER_BUILD_ARGS="['COMMIT_SHA=$COMMIT_SHA']"
will set the entire list and others that were defined in
pants.tml
are removed. I was not able to get
+[..]
syntax working
I would like to have a default value for an arg, so just putting the arg name in
docker.build_args
to extract it from the env is not an option.
h
You want to add the arg for all images, or just one?
e
I want it to apply to a single
./pants package <target>
run
h
OK, but all images in the run (but there happens to be just one)?
You can set per-image args on the docker_image target IIRC, just wanted to be sure that's not what you're asking about
So
./pants --docker-build-args='+["COMMIT_SHA=LITERAL_SHA"]' ...
should work, does it not?
e
PANTS_DOCKER_BUILD_ARGS="+['COMMIT_SHA=$COMMIT_SHA']"
does not work, I will confirm with the cli arg