The main difference between container and garden plantings is that you'll need to water containers more often -- small containers may need watering twice a day during hot, sunny weather. And because the roots are confined and can't go searching for nutrients, you'll need to provide regular feedings. A weekly application of a balanced liquid fertilizer, such as a mix of seaweed and fish emulsion, should suffice.
You'll also need to keep an eye out for insect and disease problems. While container-grown plants are sometimes less vulnerable to pest attack because they receive extra attention and/or are kept at a distance from the rest of the garden, you'll want to examine the foliage, flowers, and fruit regularly. Many insects can be controlled with an occasional spray of insecticidal soap. Some insects, such as aphids, can be kept in check by simply hosing them off the plants every few days.
Although you can grow most vegetables in containers, if you're just starting out, here are some of the most reliable.
Vegetables: beans, beets, kale, cucumbers, eggplant, lettuce, peas, peppers, tomatoes
Herbs: basil, chives, parsley, rosemary, sage, tarragon, thyme
In general, it's a good idea to choose compact varieties over sprawling ones. For example, bush cucumbers will make a tidy mound; if you grow vining varieties you'll have to provide a trellis or allow them to trail down over the sides of the container. The same goes for beans and peas. Determinite tomatoes stay smaller than indeterminite varieties, and are easier to contain in a standard tomato cage.
However, if you are willing to provide a sturdy trellis for vines to climb, go ahead and plant pole beans, vining cucumbers, and climbing peas, and plan to stake indeterminite tomatoes. In these cases, since plants can get quite top-heavy, use a relatively large, heavy container, and consider securing the trellis to a wall.
It goes without saying that you'll have marginal results if you plant a long variety of carrot in a shallow container. In general, it's a good idea to save shallow, decorative containers for annual flowers, and choose relatively deep pots for vegetables. The traditional flower pot shape -- which is at least as tall as it is wide -- is a good pattern to follow.
Minimum container sizes vary depending on the vegetable. Tomatoes, for example, grow well in 5-gallon buckets, though some compact varieties have been bred to thrive in smaller containers. (There are even some compact cherry tomatoes that will grow in hanging baskets!) Peppers and eggplant will thrive in 2-gallon containers. (A 2-gallon nursery pot measures about 8 inches in diameter and 10 inches high.) Bush varieties of squash and cucumbers will do well in 5-gallon pails, but avoid huge, sprawling varieties of winter squash and pumpkins.
If you've purchased transplants or started your own seeds indoors, harden off the plants before planting them into their permanent container. It's much easier to move small flats around as you gradually expose the plants to outdoor conditions. If you're planting seeds, follow the guidelines on the seed packet to determine planting dates. You can move the planting date up by a week or two if you're able to move your containers to a sheltered spot if a cold snap threatens.
Most vegetables and herbs adapt well to growing in containers. In fact, many plants will actually do better in containers than if planted directly into the garden. For example, in cold climates, heat-loving vegetables like peppers and eggplant thrive in containers, because the container and soil are warmed by the sun. Also, you can use a soil mix specially suited to each type of plant.