A fire onboard a nuclear submarine docked at the Mediterranean port of Toulon is under control, the local prefecture said on Friday.