How to use pups - run output in docker?

For a long time I didnt really understand what pups was and I am still a bit confused to be honest. :grinning_face_with_smiling_eyes: :sweat_smile:

I get that the discourse docker images need to be configured. Instead of doing this via bash scripts it is done via the yml files (that produce bash scripts) to be found at: https://github.com/discourse/discourse_docker/tree/master/samples

the launching of the docker containers and the configuration via pups is intertwined in the launcher script here.

the line i linked to is of special interest to me. It seems to make pups run in the docker container. I tried to run a test.yml through pups and obviously it didnt get run in a docker container. It just produced a bash script (bash commands?) that was immediately executed.

My question is: how do I make pups run in the dev docker container? This line I pointed to is very long and some of it seems to be unnecessary for my use case. maybe someone can give an easy example of how to combine the output of pups with a docker container.

I basically want to add a pups command similar to the one in the launcher script. at the end of the boot_dev script (or run it as a separate script after the boot dev script)

background information:

reason behind doing this β†’ I want to add a long running process to runit. @merefield pointed me to his Frotz plugin as a reference on how to do this

the question is: how do I do this locally for testing the pups input. As I understand the docker dev instance isnt configured via a yml file and pups. The Frotz plugin pups input is concerned with the server yml file while installing the plugin, so I am basically confused how to do this locally.
Okay, thaaanks :sweat_smile:
EDIT:
okay I found these kind of lines.

so it means pups just needs to be run in the container. I dont know why I thought its just to generate commands. I just saw this sentence in the readme

pups is a small library that allows you to automate the process of creating Unix images.

It didnt make much sense to me so naturally my subconsciousness took over.

The --gen-docker-run-args argument is used to make pups output arguments be in the format of docker run <arguments output> .

somehow this lead me to conceptualize pups as a thing that turns yml files into bash command outputs. Like a yml to bash compiler. But actually its more like a yml interpreter. It not only creates the commands it also executes them immediately.