Hello! A quick plugin question - is it possible to...
# general
Hello! A quick plugin question - is it possible to supply input on stdin to a
It is not, other than an
where the user supplies that input What's the use case, if you're able to share?
i"m trying to containerize an application and I was thinking it'd be nice to pipe the dockerfile into
docker build
? I think I can write it out into the root of the process digest though?
I think I can write it out into the root of the process digest though?
Yeah, I would recommend doing that. To start, you can use `PathGlobs`: https://www.pantsbuild.org/docs/rules-api-file-system#pathglobs Likely more scalable for a docker plugin is to create a
target type with a
field https://www.pantsbuild.org/docs/rules-api-and-target-api#the-sources-field, which under-the-hood is using
Then, you'll put this digest into
on the Process, and your argv can refer to it becuase that file will be present in the chroot
Also check out #plugins if your'e not yet in it
neat thanks! I wasn't in that channel but I just joined
❤️ 1
that is what I landed on for copying the sources into the container but I was trying to figure out how to add the generated Dockerfile into the build context
Ah, there, you will use
To capture output files from the process, set output_files: Iterable[str] and/or output_directories: Iterable[str]. Then, you can use the ProcessResult.output_digest field to get a Digest of the result.
You likely need to then use
to get a single digest from all the different ones you're accumulating
maybe I misunderstand but I don't think I want the dockerfile as an output - it's ephemoral & generated on the target. Then I'd want to run
docker build
as a process to create the image? Does that make sense
we could support propagating some fixed stdin to a
locally, but it isn’t supported in remote execution… so yea, using a file is a good idea. it’s also possible to imitate it by spawning a shell and piping file contents into the process you’re trying to launch
👍 2