@@ -98,7 +98,23 @@ def _test(self, line):
9898
9999 '''
100100 self .test = self ._setup ('HEALTHCHECK' , line )
101-
101+
102+
103+ # Arg Parser
104+
105+ def _arg (self , line ):
106+ '''singularity doesn't have support for ARG, so instead will issue
107+ a warning to the console for the user to export the variable
108+ with SINGULARITY prefixed at build.
109+
110+ Parameters
111+ ==========
112+ line: the line from the recipe file to parse for ARG
113+
114+ '''
115+ line = self ._setup ('ARG' , line )
116+ bot .warning ("ARG is not supported for Singularity! To get %s" % line [0 ])
117+ bot .warning ("in the container, on host export SINGULARITY_%s" % line [0 ])
102118
103119# Env Parser
104120
@@ -398,6 +414,7 @@ def _get_mapping(self, line, parser=None, previous=None):
398414 cmd = line [0 ].upper ()
399415
400416 mapping = {"ADD" : self ._add ,
417+ "ARG" : self ._arg ,
401418 "COPY" : self ._copy ,
402419 "CMD" : self ._cmd ,
403420 "ENTRYPOINT" : self ._entry ,
@@ -411,7 +428,7 @@ def _get_mapping(self, line, parser=None, previous=None):
411428 "VOLUME" : self ._volume ,
412429 "LABEL" : self ._label }
413430
414- # If it's a command line, return correct functoin
431+ # If it's a command line, return correct function
415432 if cmd in mapping :
416433 return mapping [cmd ]
417434
@@ -448,7 +465,6 @@ def _parse(self):
448465
449466 parser = self ._get_mapping (line , parser , previous )
450467
451-
452468 # Parse it, if appropriate
453469 if parser :
454470 parser (line )
0 commit comments