Moussa Coulibaly, now 35, staged his assault just weeks after the killing of 12 people at the Charlie Hebdo newspaper offices in Paris, the beginning of a wave of assaults carried out in the name of the Islamic State (IS) and other jihadist groups.
In issuing its ruling, the judges noted that Coulibaly had shown “little or no regret” for the attack, in which two soldiers were injured before a third wrestled Coulibaly to the ground.
They found “an almost fanatical determination” to apply IS calls for French citizens to carry out terror attacks on home soil.
The assault sparked criticism of the government's security efforts after the Charlie Hebdo massacre, since Coulibaly was well known to police.
A few weeks earlier, French intelligence services had been alerted to the fact that he was trying to enter Turkey – a key staging point for jihadists seeking to go fight in Syria – and asked the country to expel him.
He was questioned upon his return but later released because of insufficient evidence to press charges.
After the Nice attack Coulibaly told investigators he hated France as well as police, the military and Jews.
But in court on Thursday, Coulibaly said: “I'm now against violence. I would not do again what I did.”