It depends on the difficulty you have it on and what upgrades. However, that said, everything up to hard can be beaten by just making mass marines and medics.
They key is a mobile army as you need to deny them from sealing off cansiters as well.
You need to be making constant SCVs until you have full saturation (minimum 2 SCVs per mineral patch and 3 per gas, unless you have the auto refinery). Then try to keep your money low by constantly making marines and medics. A few marauders will help as well. On insane I toss in a few goliaths to help with the void rays and scouts that they send out as well.
A few missile turrets as well as a bunker at the top of the ramp is almost enough defense to hold off any attack they send at you. If not it buys you enough time to get your army back if they are not in base.
The level also gets exponentially harder the longer you wait to gather as the protoss will have more units sent to attack as well as sealing off multiple canisters at the same time so it is in your best interest to be aggressive and grab the canisters early.