Onions can be grown in containers, but they need to be at least 30cm deep and have good drainage for the bulbs to develop fully.