A lot of people seem to be interested in growing tomatoes in a restricted space, so we've decided to include an article about growing tomato plants in a pot.
First of all, you should choose a pot or a container at least eight inches deep (but it is the absolute minimum, twelve or even sixteen would be perfect): most tomato plants, even the ones producing small cherry tomatoes, are quite large and need a lot of space for maximum production. The larger your container, the larger the amount of fresh tomatoes your plant will produce.
You will also need to drill at least four small holes in the pot, for drainage, and if the pot already has large pots you can reduce their drainage using coffee filters.

Another consideration is the material of the pot: plastic and fiberglass pots are water-proof and tend to retain more moisture, so they are much more suited for tomatoes than clay pots. Besides, plastic pots are less expensive and break much less often than clay pots.
If you're concerned about economic factors, a good and inexpensive option is a five gallon bucket.
Tomato plants usually need a constant amount of moisture, and should generally not be planted into regular soil.
You should fill your pot with gardening soil with moisture retaining material: this will help keep a constant level of moisture throughout the day.
You should also enrich the soil, at least a week before planting the seeds, with lots of organic material such as fish emulsion, compost and any other all-purpose vegetable fertilizer. The stem should be totally buried, up to about the first set of leaves. New roots will grow along the buried section of the stem improving the general condition of the plant.
A general rule for understanding the correct amount of water is this: stick your finger into the soil and if the first two inches are dry, then it's time to water again.
Tomatoes should be first planted indoors, to allow for them to grow enough to be able to sustain the threat of frost. Once the plant is large enough to withstand the cold months, it is safe for planting outside.
Alternatively, you could buy an already grown plant from your local greenhouse, but it should be transplanted as soon as possible.
During hot months, you should aim to keep the soil constantly moist by keeping it well-watered. Don't spill the water on the foliage (this increases the chances of developing diseases and mold): just water the soil and the plant will get the water it needs from the roots.
When your tomato plant grows up to a foot, you should try to understand what variety it is: determinate plants generally grow to a pre-determinate level and then stop, and do not need staking. If your plant is of the indetermined variety, it will most likely need staking once it reaches a foot in height.
You should strive to keep a constant level of moisture (not too much though, the plant should not be floating in water). The high levels of water tend to wash out the nutrients, so fertilizing is best applied bi-weekly at half strength, for a constant stream of nutrients to the plant. Alternatively , you can also fertilize once a month at full strength.
Mulching isn't too important since the tomato will grow indoor, but it still helps to use some pebbles, bark mulch, and straw to prevent weeds from growing and stealing precious nutrients from your tomato plant.
When tomatoes are ripe, they generally have a yellowish-orange color, but this largely depends on the variety you're growing: you can find even some varieties whose fruits are green when ripe.
As a general rule, you should be able to pop the fruit from its stem with a light twist.