I need to run a docker container with a Singularity and pass the option --add-caps CAP_NET_BIND_SERVICE to singularity exec. The command outside CWL looks like:
I’m a bit confused as to why you need permission to bind to a privileged port (or any port for that matter). The CWL standards were designed for batch processing using command line tools; not for orchestrating services.
To answer you original question: you should be able to fork the codebase for cwltool (which toil-cwl-runner uses) to add the desired Singularity options. As one of the maintainers of cwltool I would likely accept a code contribution that makes the desired changes to toil-cwl-runner possible; however I would not want to expose that to regular users of cwltool.