To grow garlic in pots is a bit of a challenge, because it has a very long growing season and garlic needs regular watering. That said, it is well worth the work. You can grow hard to find varieties and the taste, as with almost any fresh-picked vegetable or herb, will make you an instant homegrown garlic addict. To top it off, if you grow hard neck garlic, you get to eat the scapes which are a delicacy that is just catching on in popularity.
However, if you live in a mild weather area, softneck garlic will grow best. The hardneck varities grow best in cold weather climates.
What makes growing garlic in pots difficult is that you generally plant it in the fall and don't harvest until the middle of the summer. That's a long growing season, and keeping the garlic well watered over all that time can become tedious. To help with this problem, the bigger the pot you use, the more soil it will hold and therefore the more moisture it will retain.
If you live in a cold climate, make sure that you choose a garden pot can freeze and thaw without breaking. I use Smartpots for growing garlic, which are made of fabric and are perfect for winter conditions.