Yeah, that’s a terrible cover on Batman 115 (April 1958), and the story, by Finger, Moldoff and Paris isn’t much better.
But it is a Carter Nichols story, so I have to write about it. While all the previous Nichols tales have seen Batman and Robin travel back to a real time period, in this story they wind up interacting with a completely fictional world of the past, and the Zotos, a race of giants.
Batman tries some normal inventions to help the people hold off the race of giants, but these prove unsuccessful.
So instead he fakes some magic, using a balloon figure of himself to convince the giants that he can change his own size. The bottle element does appear towards the ending, but it’s part of his fake magic, rather than a prison as implied by the cover.