That depends on a wide variety of parameters, actually. If the amount of explosives was a lot smaller, a containment with a really long, narrow curved outlet in which the shockwave can dissipate might work. But any airtight containment just turns into a pressure container until it fails. And then the escaping shockwave will likely be more destructive than if the container hadn't been there.