My FIL has a floating dock made with plastic barrels and wood like this. They take it out and dismantle it every winter and I helped to put it together last spring so I saw how it was done.

Here is how his works.

First put eye hooks on under side of the main support beams such that you will have 2 on each side of every barrel. Second you run the barrels parallel with the main support beams under the decking that way the weight of the dock its self helps to keep them in place in between the 2x10 (or whatever you used) beams. Third take 2 bungee straps per barrel and strap them into the eye hooks. and around the barrel.

The straps combined with the weight of the dock and the friction of the joists should keep the barrels in place nicely.