Planning aside, yes you can do this and it's not overly complicated. My background in in the construction industry and when we work on projects out site offices are usually modular buildings constructed out of steel containers.
Joining the units together depends on if you are looking to make them open plan or just have doorways between. Doorways would mean creating a link between the buildings and waterproofing it. Open plan would involve cutting the sides out of the container and butting them against each other. You would then seal around the joint or in your instance you could put a roof over the whole thing.
Heating would usually be done via electric heaters of if you need heating and cooling a split duct or dx type air con and heater.
If you look up modular container buildings this will give you an idea of what you can create