Marigolds will do fine in containers, you could just put some in pots around the outside of the garden, or use some kind of hanging/window box type planter on your fence. Or put them in pots and move them around the garden through the season wherever you have room.
You might lose a tiny bit of the companion planting benefits by not having them share soil and root contact with your garden plants, but the insect repelling benefits will remain.
