An Iraqi court sentenced eight French nationals to life in prison on Thursday for joining the Islamic State (IS) group, as the country presses ahead with prosecuting thousands of suspected jihadists.