Have the reparse tool also display the from line

This commit is contained in:
Joseph Schorr 2014-09-15 13:55:06 -04:00
parent 913b3e472f
commit bdbfb0c6d3

View file

@ -15,4 +15,9 @@ for index, command in reversed(list(enumerate(parsed_dockerfile.commands))):
parsed_dockerfile.commands.insert(new_command_index, env_command)
break
image_and_tag_tuple = parsed_dockerfile.get_image_and_tag()
print image_and_tag_tuple
if image_and_tag_tuple is None or image_and_tag_tuple[0] is None:
raise Exception('Missing FROM command in Dockerfile')
print serialize_dockerfile(parsed_dockerfile)