@@ -307,7 +307,7 @@ def new_js_proc(
307307
308308 if nodejs is None or nodejs is not None and required_node_version is False :
309309 try :
310- nodeimg = "docker.io/node:slim "
310+ nodeimg = "docker.io/node:alpine "
311311 if container_engine == "singularity" :
312312 nodeimg = f"docker://{ nodeimg } "
313313
@@ -322,10 +322,14 @@ def new_js_proc(
322322 singularity_cache = os .environ .get ("CWL_SINGULARITY_CACHE" )
323323 if singularity_cache :
324324 singularityimgs = glob .glob (
325- singularity_cache + "/node_slim .sif"
325+ singularity_cache + "/node_alpine .sif"
326326 )
327327 else :
328- singularityimgs = glob .glob (os .getcwd () + "/node_slim.sif" )
328+ singularityimgs = glob .glob (
329+ os .getcwd () + "/node_alpine.sif"
330+ )
331+ if singularityimgs :
332+ nodeimg = singularityimgs [0 ]
329333 else :
330334 raise Exception (
331335 f"Unknown container_engine: { container_engine } ."
@@ -338,7 +342,7 @@ def new_js_proc(
338342 len (dockerimgs .split ("\n " )) <= 1
339343 )
340344 if need_singularity or need_docker or force_docker_pull :
341- # pull node:slim docker container
345+ # pull node:alpine docker container
342346 nodejs_pull_commands = [container_engine , "pull" ]
343347 if force_docker_pull :
344348 nodejs_pull_commands .append ("--force" )
@@ -400,15 +404,15 @@ def new_js_proc(
400404 pass
401405 else :
402406 raise
403- except subprocess .CalledProcessError :
404- pass
407+ except subprocess .CalledProcessError as e :
408+ _logger . debug ( "Error while attempting to run nodejs: %s" , e )
405409
406410 # docker failed and nodejs not on system
407411 if nodejs is None :
408412 raise JavascriptException (
409413 "NodeJSEngine requires Node.js engine to evaluate and validate "
410414 "Javascript expressions, but couldn't find it. Tried {trynodes}, "
411- f"{ container_engine } run node:slim " .format (
415+ f"{ container_engine } run node:alpine " .format (
412416 trynodes = ", " .join (trynodes ), container_engine = container_engine
413417 )
414418 )
0 commit comments