https://pantsbuild.org/ logo
h

high-yak-85899

05/23/2022, 7:23 PM
I'm having trouble following the source. Where exactly does something like
{<http://build_args.MY|build_args.MY>_ARG}
get translated into its
KEY=VALUE
pair for docker image tagging?
I've followed it up to
docker_build_args.py
where
DockerBuildArgs
is getting made, but having trouble seeing the last effort to transform things to environment variables when templated as such.
Looks like
docker_build_context.py
?
h

hundreds-father-404

05/23/2022, 7:31 PM
yeah I think that's the file
h

high-yak-85899

05/23/2022, 7:32 PM
I'm not seeing where the surrounding braces are stripped off
Unless maybe that's not how the environment returns things?
f

fast-nail-55400

05/23/2022, 7:46 PM
DockerInterpolationContext.format
is the probably the method you seek
(and which is used in
docker_build_context.py
)
h

high-yak-85899

05/23/2022, 8:03 PM
Got it. Thanks. I think the docker usage is far more complex than my needs so I'll just simplify for now.
2 Views