Answer: It can be difficult to grow tomatoes in containers, in part because the roots are constricted and in part because the soil may be imbalanced in one way or another. For best results, try to use a variety that is characterized as doing well in containers, and use as large a container as possible. A five gallon bucket would be the minimum size for a standard tomato, with a half barrrel planter being better. Next, use a good quality potting soil. A soilless mix is often preferred because it is relatively sterile. It also holds both water and air so it can be kept moist yet well drained. Next, careful attention to fertility can make a big difference. You might use a water soluble fertilizer formulated specifically for tomatoes applied according to the label instructions along with an occasional top dressing of compost. An occasional application of a seaweed based water soluble fertilizer with many micronutrients can also help. Finally, make sure you grow disease resistant varieties; avoid wetting the foliage during routine watering; if they are blooming but not setting fruit there may be a pollination problem. If this is the case, give the plant a good shake about once a day or so and/or try one of the tomato blossom set sprays available at garden centers.
Last but not least, the symptoms you are describing sound like a nutrient problem of some sort. For instance, a nitrogen deficiency can cause small plants and purple veining, a phosphorus deficiency can cause a purple tinge and slow fruit set, too. A pH that is too high (above about 6.5) can cause yellowing and show the veins as can an iron deficiency. You might try some foliar applications of a fertilizer formulated for acid loving plants and with micronutrients; also as a tonic and to combat what may be an alkaline pH, try two or three foliar applications of Epsom salts (Mix in water at a rate of a Tablespoon epsom salts to a gallon of water) about a week apart and see if that helps. Also be sure that the plants are being kept evenly moist but not overwatered.
Q&A Library Searching Tips