thousands-plumber-33255
07/07/2022, 1:51 PMinstructions
field of docker_image
and then reuse it for multiple applications? E.g.
instructions=[
"FROM python:${VARIANT}"
"COPY ${DYNAMIC_DIR} /app",
]
Background: the Dockerfile for a lot of services looks almost the same.bitter-ability-32190
07/07/2022, 2:00 PMcurved-television-6568
07/07/2022, 2:00 PM__defaults__
feature:
https://www.pantsbuild.org/docs/macros
https://github.com/pantsbuild/pants/blob/main/docs/markdown/Using%20Pants/concepts/targets.md#field-default-valuesbitter-ability-32190
07/07/2022, 2:01 PM__defaults__
is another angle.
Also if the targets are in the same BUILD
, remember BUILD
files are just Python(-ish)curved-television-6568
07/07/2022, 2:02 PMbitter-ability-32190
07/07/2022, 2:03 PMbitter-ability-32190
07/07/2022, 2:03 PMcurved-television-6568
07/07/2022, 2:03 PMthousands-plumber-33255
07/08/2022, 6:26 AM__defaults__
feature can be utilized here. Can you give an example?thousands-plumber-33255
07/08/2022, 8:38 AMbitter-ability-32190
07/08/2022, 10:37 AMbitter-ability-32190
07/08/2022, 11:11 AMdef my_docker_image(...):
return docker_image(
instructions=[
"...",
f"{foobar}",
...
curved-television-6568
07/08/2022, 12:16 PMI am not getting how theAh, I somehow overlooked the dynamic nature of the default template you asked for @thousands-plumber-33255. Sofeature can be utilized here. Can you give an example?__defaults__
__defaults__
would not be a fit for that case.