From the Super Mario Wiki
The minigame starts with a Barrel roulette. When the player presses the button, the roulette stops on a small, medium, or large Barrel, determining the size of the barrel used by Donkey Kong. His objective is to collect as many falling Bananas and Banana Bunches into the Barrel as possible within a time limit of ten seconds. When the minigame ends, Donkey Kong hides in the Barrel, and the number of collected Bananas are revealed as they fly out. Donkey Kong gets an Extra Life for every 100 Bananas that he collected.
An Adobe Flash version of this minigame, known as Banana Bonanza!, was playable on the official DK: Jungle Climber website. The browser version was largely the same as the original minigame, although it did not have a visible time limit.