cqfd icon indicating copy to clipboard operation
cqfd copied to clipboard

add 'docker run' pre command

Open gdoffe opened this issue 5 years ago • 1 comments

It could be useful to launch some custom commands just before the 'docker run' one to prepare a specific environment. An example is to create a pool of cqfd running instances using 'sem' command with: 'export CQFD_DOCKER_PRE_RUN="sem -j2 --fg --tty --id cqfd.sem"' This will create a pool of 2 (-j2) running cqfd instances and will make the 3rd instance waiting a previous one to end. This kind of setup is often useful on build servers to allocate build tokens. If CQFD_DOCKER_PRE_RUN is not set, 'docker run' will be launched normally by setting CQFD_DOCKER_PRE_RUN to your current shell interpreter '$SHELL -c'.

Signed-off-by: Gilles DOFFE [email protected]

gdoffe avatar Jun 12 '20 09:06 gdoffe

Hello Gilles,

Would running sem -j2 --fg --tty --id cqfd.sem cqfd directly from the shell do the same thing?

I think if people want to wrap cqfd in something else, they will use the facility of the wrapping program rather than look for something inside CQFD. For example: sudo cqfd looks more intuitive than CQFD_DOCKER_PRE_RUN=sudo cqfd.

cperrysfl avatar Dec 27 '21 17:12 cperrysfl