lemonbelly, it would work well as long as you stayed below the radar
. In parts
of the US, the local businesses would report you for running a food
preparation business without that license
(and the proper kitchen facilities and permits) as well as being an unlicensed vendor. No one likes competition, and if they can shut it down with a phone
call--they will make the call.
In more casual places...I can think of a lot of cruisers who'd be willing to pay up for the chance to get some fresh croissants and coffee at their rail early in the morning. And if there's no competition (and you remember to leave a sample with the harbormaster) "no harm no foul" usually will apply.
Most pay-for-dockage marinas will want a slice of whatever money
is being made on their property, though. Formally or informally, if they see it happening for any length of time.