If you are talking wooden boxes going directly on the cabin
top, mark the sides of the box on the cabin
top, drill down through the deck 3/8" or so in from your marks, place the boxes back in place and have someone hold the box, go below and drill pilot holes into the boxes and screw from the inside though the predrilled holes. You only need to caulk around the screw holes. If you caulk all the way round, you'll seal the boxes to the deck and they could fill up with water
. Best to cut a couple of limber holes on each side of the box base to let water out.
LifeCalk is my favorite but have also used butyl. Polysulfide caulks will also work but tend to be a bit sticky.