how useful they would be against common raiders
It's not a bad idea, but the lack of mobility becomes decisive pretty quick. Most worlds in BT have a ton of locations they want to protect, so a single mobile force is very desirable. For this to work well, you'd need to be pretty sure about the raiders target list. They can, after all, simply not go there, and that response would be very typical for raiders who encounter a threat they can't wipe out easily; damage = cost, and often harder for them to repair than a unit that can plug in to a House' logistics train. You'd get off 1 salvo, and the enemy either retreats, or they simply move around you and attack you from behind.
The specific design is not a bad approach of what to stick in a 10 ton container. I think the lack of armor becomes a problem. Even the lowly LRM Locust they mention only needs to land 1 salvo to wreck it. With it being immobile, and the Locust presumably working to get a +4 out of mobility and cover, the odds are actually quite decent that it won't get hit. Base 4 of the launching container (generous given the circumstance) +4 for range, +4 for the Locust's movement. 12's. 13 (impossible) if the gunners must be 5.
Meanwhile that Locust needs a 4 + 2 run, +4 range, -4 immobile target is a mere 6 to hit. It is killing 1 per turn, on average.
But with 30 shots back, that Locust will take damage, the one thing it can't really do, and the example 1M Locust wouldnt engage in this kind of duel no matter what, if it had any say.
Using Improved Positions and fakes definitely helps, as does working to ensure they can fire indirectly. And actually landing an ambush with a bunch of these can be extremely successful. But not realistic unless you know the enemy really only wants to hit 1 or 2 locations. That's not an impossible scenario, but still feels like a margins play.
Like I said, it's not a bad idea, but it is easily countered. Daryk's Vulcan (25 containers) idea is very much on point. Other problems would be 'Mechs like the Valkyrie (15 containers) or Toro (17 containers), which have the armor to really hurt the math against our containers. Never mind the Mechs that would simply ignore the first few salvos and wade in.
It might be fun to play out, but I'd recommend investing in armor.
Also I may recall wrong, but I think some tonnage is needed for the fire control, so you can't get 3 LRM5s in there anyway. If I'm right about that, use the remaining mass for armor. Or if you're trying to invest a Mechs worth of money in to containers... get a Mech. At least they can still turn when that Commando has moved out of your container's firing arc.
A somewhat more sustainable idea may be to do this with Rocket Launchers, or OS-LRMs, since the enemy won't have much reason to wreck the containers. And a 10 ton one could get 20 RL-10s (300k in weapon payload) or 6 RL-20 (270k weapons payload) if I'm wrong about the fire control need. Definitely more expensive.