What Brian says about a sloping roof is true if you don't have a high (9-1/2') box or have your box elevated on some type of structure. Otherwise, you can easily go out to 12' to 14' depending on your final height. Around here with no snow load whatsoever, a 1' drop would be plenty, so you would have 8' of clearance or a bit more at your drip edge.
I did a lean-to barn on one side of my container, but also framed over the top and built a raised roof over the top. It's amazing how much cooler your roof will be if you do this. Since the box was only 8' wide, the flat roof sheds water just fine. Water never gets deeper than the ridges in the metal. I framed over the top and then attached my lean-to rafters directly to the frame. I didn't have to drill into the container except on the side by the door to attach a 2x6 to fasten the side purlins to. I did drill along the top, but that was into the square tube that runs along the top edge and doesn't open into the interier of the container. I posted a thread here on TBN, but I just can't find it. I'll post a bunch of photos below so you can see how I did it.
I'll start with the top frame structure. I cut 2x4 blocks and attached a Simpson "L" bracket to them with deck screws. I put a 2x4 along the top of the square tubing and then attached the block with more deck screws so that the "L" bracket sits under the square tubing. I used self-drilling fasteners to attache the bracket to the bottom of the square tubing.
If you choose not to frame over the entire top, I'd use treated lumber for the ledger and screw it directly to the square tubing with long self-tapping screws. I would not screw into the sides of the container unless you feel it is needed. It was not necessary for me to use treated lumber because my wood never gets wet.