@@ -118,7 +118,7 @@ def __del__(self) -> None:
118118 try :
119119 with open (cidfile [0 ]) as inp_stream :
120120 p = subprocess .Popen ( # nosec
121- ["docker" , "kill" , inp_stream .read ()],
121+ [args [ 0 ] , "kill" , inp_stream .read ()],
122122 shell = False , # nosec
123123 )
124124 try :
@@ -318,6 +318,8 @@ def new_js_proc(
318318 nodeimg = "docker.io/node:alpine"
319319 if container_engine == "singularity" :
320320 nodeimg = f"docker://{ nodeimg } "
321+ elif container_engine == "podman" :
322+ nodeimg = "docker.io/library/node:alpine"
321323
322324 if not self .have_node_slim :
323325 singularity_cache : Optional [str ] = None
@@ -338,6 +340,16 @@ def new_js_proc(
338340 )
339341 if singularityimgs :
340342 nodeimg = singularityimgs [0 ]
343+ elif container_engine == "udocker" :
344+ matches = re .search (
345+ re .escape (nodeimg ),
346+ subprocess .check_output ( # nosec
347+ [container_engine , "images" ],
348+ universal_newlines = True ,
349+ ),
350+ )
351+ if matches :
352+ dockerimgs = matches [0 ]
341353 else :
342354 raise Exception (
343355 f"Unknown container_engine: { container_engine } ."
@@ -367,7 +379,10 @@ def new_js_proc(
367379 )
368380 self .have_node_slim = True
369381 nodejs_commands = [container_engine ]
370- if container_engine != "singularity" :
382+ if (
383+ container_engine != "singularity"
384+ and "udocker" not in container_engine
385+ ):
371386 nodejs_commands .extend (
372387 [
373388 "run" ,
@@ -379,7 +394,7 @@ def new_js_proc(
379394 "--rm" ,
380395 ]
381396 )
382- else :
397+ elif "singularity" in container_engine :
383398 nodejs_commands .extend (
384399 [
385400 "exec" ,
@@ -389,6 +404,15 @@ def new_js_proc(
389404 "--userns" if singularity_supports_userns () else "--pid" ,
390405 ]
391406 )
407+ elif "udocker" in container_engine :
408+ nodejs_commands .extend (
409+ [
410+ "run" ,
411+ "--device=/dev/stdin" ,
412+ "--device=/dev/stdout" ,
413+ "--device=/dev/stderr" ,
414+ ]
415+ )
392416 nodejs_commands .extend (
393417 [
394418 nodeimg ,
0 commit comments