comments are removed from dockerfile before parsing out lines

PR for #2407