They absolutely have to do something about shipping.
My suggestion is still to have a secured and inspectable arms locker of certain acceptable weapons that the harbor pilot or even Customs would secure with a secondary lock for the entire time the ship is in port. I can't see why anyone would have a problem with that. They had it in the past, the world got safer, now the world is dangerous again, it's time to bring it back.
They can mandate that they all be painted bright freaking happy neon, whatever. But ships need things like shotguns and carbines for the crew, and they need it now. On cruise liners, everyone's a firefighter, they receive some training and are expected to help, some receive extra training and get air helmets and other gear. They don't have a problem with that. I can't see how training to repel boarders with simunitions, with shoot/don't shoot scenarios, would be any different.
Secondly, why the heck don't they refit things like cruise liners or even tankers so that there's a man-trap of some kind before you get to the bridge? Even just secure the door and add a manual firing control to flood the bridge access corridor with halon if the pirates are trying to bust in. Put less-lethal things like CS or pepper gas flood systems in the engineering spaces. That'll take care of them quick!