Make the command portion of the dockerfile parser case insensitive.

This commit is contained in:
jakedt 2014-04-17 16:49:04 -04:00
parent 0d8725e778
commit 5a2a64074f

View file

@ -1,7 +1,7 @@
import re
LINE_CONTINUATION_REGEX = re.compile('\s*\\\s*\n')
COMMAND_REGEX = re.compile('([A-Z]+)\s(.*)')
COMMAND_REGEX = re.compile('([A-Za-z]+)\s(.*)')
COMMENT_CHARACTER = '#'
@ -70,7 +70,7 @@ def parse_dockerfile(contents):
for line in lines:
match_command = COMMAND_REGEX.match(line)
if match_command:
command = match_command.group(1)
command = match_command.group(1).upper()
parameters = match_command.group(2)
commands.append({