quiet-evening-25363
12/08/2021, 7:56 PMdocker run -it -v ... -- rm docker_image:latest './pants run <pex binary target>'
This does work, but the docker command is really wordy, and when I pass it off to my team I will probably add an interface layer with scripts orย make
ย to alias things. Ideally we could work only from the pants interface though!
this thread seem to be related:ย https://pantsbuild.slack.com/archives/C01SPQQ2WK1/p1635265741056800
thanks!curved-television-6568
12/08/2021, 8:05 PMpython_test
:
pex_binary(..., run_in_container=":dev-env-image")
busy-vase-39202
12/08/2021, 8:34 PMhappy-kitchen-89482
12/08/2021, 9:07 PMquiet-evening-25363
12/08/2021, 10:55 PMpants run Dockerfile
).
In the ideal case I guess I would like to conceptualize the docker image as a configurable env for the pex binary vs. the docker image having awareness/ownership of the pex binary, and avoid the overhead of maintaining a list of binaries in the Dockerfile vs. only directly configuring the build rules. just brainstorming ways to get away with pants run <pex binary>
as the definitive running command for a target regardless of whether you want to run it in a container or directly on your machine, but I can file a feature request ๐happy-kitchen-89482
12/09/2021, 6:53 AMhappy-kitchen-89482
12/09/2021, 6:53 AMhappy-kitchen-89482
12/09/2021, 6:54 AM