Fire broke out onboard a nuclear submarine docked at the Mediterranean port of Toulon on Friday and was still raging but under control by afternoon, local officials said.