I have some experience with dry ice in closed containers.
Every now and then some friends and I will get some dry ice, a bunch of plastic bottles and other containers with a screw-on lid and have a laugh making small explosions.
Basically you take a bottle, fill it 1/4 with water and 1/2 with dry ice and screw the cap on. You then have around a minute before it explodes.
A 1/2 liter coke bottle will make a nice whooompf and a 20 liter plastic gasoline can (the largest we have tried) will make a bang that can be heard maybe half a mile away. They very rarely sizzle out, and the ones that do probably have a defect, or we didn't get the cap screwed on properly. There's some time pressure, so you don't stand around checking before you throw the container. I would imagine that a metal container will make a pretty big bang (higher pressure before it ruptures) and may throw out some nasty debris.
Back when I did this a few times a year, 20oz soda bottles made the best boom. 2-liter bottles couldn't take as many PSI and water bottles... well, they're not designed to contain pressure. They'd fail at the cap, usually.
That may no longer hold, since 20oz bottles feel flimsier these days and all have low-profile caps. Haven't tried in a while.
Also, PVC pipe burried in ground, drop dry ice bomb in, drop another bottle with some water in it on top = dry ice mortar. Those little plastic bubble things that toys in vending machines come in? A little dry ice, a little water, close it, place lid down. POP, the bubble part flies a meter or so in the air.
I will note for anyone trying this that the parent's ratios are very different from what I used. Crushed dry ice to 1/10-1/8 full, about twice that much water. Unusually warm water (say, from near the surface of a pond or lake in late August) will greatly reduce time-to-boom, so beware. Too little water and it'll freeze before boom, greatly delaying or even preventing it. Very annoying. Attaching to something heavy (but NOT shrapnel-genrating) and sinking in ~5-10 feet of water is fun. Huge bubble, explosion can be felt on land nearby.
I used to do this too when I was a kid at my grandmom's house. They'd order steaks from TV commercials and receive them in the mail bundled with dry ice. It started as making foam messes with soap, water and dry ice... But soon I was filling up 2 litre bottles with ice and water and making bombs. It all ended when the police arrived because neighbors thought a gunfight was happening in their quiet residential neighborhood. Needless to say, they weren't very happy with me.
Big difference, I think, is that in your case you're mixing it with water, so it will warm up a lot more quickly. In the OP's case, he just had the dry ice in there with no water, so presumably it would melt more slowly, and there may be enough time for the carbon dioxide to escape through tiny gaps or cracks in the cap.
Every now and then some friends and I will get some dry ice, a bunch of plastic bottles and other containers with a screw-on lid and have a laugh making small explosions.
Basically you take a bottle, fill it 1/4 with water and 1/2 with dry ice and screw the cap on. You then have around a minute before it explodes.
A 1/2 liter coke bottle will make a nice whooompf and a 20 liter plastic gasoline can (the largest we have tried) will make a bang that can be heard maybe half a mile away. They very rarely sizzle out, and the ones that do probably have a defect, or we didn't get the cap screwed on properly. There's some time pressure, so you don't stand around checking before you throw the container. I would imagine that a metal container will make a pretty big bang (higher pressure before it ruptures) and may throw out some nasty debris.
It's good fun!