Safety should always come first of course! In a bowling ball mortar, only a small amount of powder should be used. With a small amount of BP (and only BP, not smokeless powder!) and the relatively light projectiles that are bowling balls, pressure should not be too high for a high pressure tank.
In a military style mortar, using a heavy ball and up to many pounds of BP, the walls must be thick! And in the old days, the metal used were brittle (cast iron) or not that strong compared to modern steel (bronze, iron, etc). The wall thickness was determined by rule of thumb and following a few century of trials and errors. For field cannons, the wall thickness at the breech around the powder was about the same as the caliber for smoothbores.
In a 24pdr Coehorn mortar using 24 pounds cast iron balls, two 24mm film platic container full of cannon grade powder can launch the projectile a good 100 yards. WIth a half pound of powder, the range is about 1000 yards...