Can I set off fireworks in a container to contain the explosion?

No! Please do not ever light fireworks in a container! If you wish to light fireworks, be sure you are in an open, clear area, away from flammable materials such ass grass, trees, dry leaves, houses, etc.