echoing-farmer-15630
01/03/2022, 7:52 PM--build-arg CONTAINER_GID={os.getgid()}
. (this was for a development container so that it ran as the existing user rather than as root or some fixed user ID).
It's not clear how to do this with extra_build_args
in pants (or generally, how to pass in a variable like that). I obviously can't import os
to call `getgid`; I could pass it in as an env variable, but I can't see how to use env variables within a BUILD
right now.
Possible or not?curved-television-6568
01/03/2022, 8:11 PMcurved-television-6568
01/03/2022, 8:13 PMdocker_image(extra_build_args=["CONTAINER_GID"])
CONTAINER_GID=$(group_id) ./pants package ..
echoing-farmer-15630
01/03/2022, 8:17 PMechoing-farmer-15630
01/03/2022, 8:17 PMcurved-television-6568
01/03/2022, 8:18 PMcurved-television-6568
01/03/2022, 8:26 PMcurved-television-6568
01/03/2022, 8:26 PMechoing-farmer-15630
01/03/2022, 8:33 PM