The cost of the shipping container around here is usually more than stick building a shed of equivalent size and then you have to deal with equipping it, leaks, snow load, etc. Typical prices are $2k/20ft $4k/40ft

You can get around most of the codes by calling them sheds and not securing them to the ground and make sure they're movable. There's some codes in certain areas that have minimum sizes for living structures. Look into the tiny home stuff online, houses built on car hauling flatbeds