Esshup is right, assuming you can afford the floats....floats are better than barrels.
However if, like me, your budget doesn't allow for floats, here's how I did mine and 8 years later the dock is still stable. And that's counting the fact that I never take it out so it freezes in solid every winter.
I used food grade barrels, and I both sealed the bungs with RTV and also rotated them so the bungs were horizontal - to make sure neither one of them spent their time under water - especially important given that the barrels freeze in place each winter.
In 8 years I've only had to replace one barrel.