As suggested in sclorg/httpd-container#94, there could be a generic ct_run_cmd function similar to what https://github.com/sclorg/httpd-container/ and some other images use -- such a function might check the output and exit code, might also print some standardized logging etc...
A note: we might get some more inspiration in beakerlib where rlRun has a similar function.